diff --git a/pygmtsar/MANIFEST.in b/pygmtsar/MANIFEST.in index c457246d..7afe0231 100644 --- a/pygmtsar/MANIFEST.in +++ b/pygmtsar/MANIFEST.in @@ -1 +1,2 @@ include pygmtsar/data/geoid_egm96_icgem.grd +include pygmtsar/data/google_colab.sh diff --git a/pygmtsar/pygmtsar/data/google_colab.sh b/pygmtsar/pygmtsar/data/google_colab.sh new file mode 100644 index 00000000..e88578f2 --- /dev/null +++ b/pygmtsar/pygmtsar/data/google_colab.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +# Install GMTSAR if needed +count=$(ls /usr/local | grep -c GMTSAR) +if [ "$count" -eq 0 ]; then + export DEBIAN_FRONTEND=noninteractive + apt-get update > /dev/null + apt install -y csh autoconf gfortran \ + libtiff5-dev libhdf5-dev liblapack-dev libgmt-dev gmt > /dev/null + # GMTSAR codes are not so good to be compiled by modern GCC + apt install gcc-9 > /dev/null + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 10 + update-alternatives --config gcc + gcc --version | head -n 1 + git config --global advice.detachedHead false + cd /usr/local && git clone -q --branch master https://github.com/gmtsar/gmtsar GMTSAR + # revert recent broken commit + cd /usr/local/GMTSAR && git checkout e98ebc0f4164939a4780b1534bac186924d7c998 > /dev/null + cd /usr/local/GMTSAR && autoconf > /dev/null + cd /usr/local/GMTSAR && ./configure --with-orbits-dir=/tmp > /dev/null + cd /usr/local/GMTSAR && make 1>/dev/null 2>/dev/null + cd /usr/local/GMTSAR && make install >/dev/null + # test one GMTSAR binary + /usr/local/GMTSAR/bin/make_s1a_tops 2>&1 | head -n 2 +fi + +# Install virtual framebuffer for interactive 3D visualization +apt install -y xvfb > /dev/null +pip3 install -q pyvista xvfbwrapper jupyter_bokeh +# note: jupyter_bokeh for panel interactive visualization backend blocks tqdm progressbar