-
-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include Google Colab installation script
- Loading branch information
Alexey Pechnikov
committed
Aug 2, 2024
1 parent
b5c58d6
commit 2ce790a
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
include pygmtsar/data/geoid_egm96_icgem.grd | ||
include pygmtsar/data/google_colab.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |