Created
May 17, 2022 22:20
-
-
Save TimoRoth/d48ecc8b4a42399ee927fc3070d677ff to your computer and use it in GitHub Desktop.
OGGM venv install script
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
#!/bin/bash | |
set -xe | |
PIP="python3 -m pip" | |
export DEBIAN_FRONTEND=noninteractive | |
sudo apt-get -y update | |
sudo apt-get -y install --no-install-recommends \ | |
gfortran \ | |
fontconfig \ | |
fonts-dejavu \ | |
git \ | |
file \ | |
build-essential \ | |
cmake \ | |
ninja-build \ | |
liblapack-dev \ | |
libopenblas-dev \ | |
libfreetype6-dev \ | |
libagg-dev \ | |
liblapack-dev \ | |
netcdf-bin \ | |
libnetcdf-dev \ | |
libssl-dev \ | |
libffi-dev \ | |
libtiff-dev \ | |
libpng-dev \ | |
libgdal-dev \ | |
libproj-dev \ | |
libhdf4-alt-dev \ | |
libhdf5-dev \ | |
libqhull-dev \ | |
libxml2-dev \ | |
libgif-dev \ | |
libjpeg-dev \ | |
libopenjp2-7-dev \ | |
libwebp-dev \ | |
libjson-c-dev \ | |
libgeos-dev \ | |
blt-dev \ | |
libdb-dev \ | |
libreadline-dev \ | |
libncursesw5-dev \ | |
zlib1g-dev \ | |
libbz2-dev \ | |
liblzma-dev \ | |
libsqlite3-dev \ | |
libgdbm-dev \ | |
libmpdec-dev \ | |
libexpat1-dev \ | |
libblosc-dev \ | |
libbrotli-dev \ | |
liblcms2-dev \ | |
libjxr-dev \ | |
liblz4-dev \ | |
libsnappy-dev \ | |
libzopfli-dev \ | |
llvm-11 \ | |
llvm-11-dev \ | |
sqlite3 \ | |
curl \ | |
wget \ | |
ca-certificates \ | |
unzip \ | |
proj-bin \ | |
proj-data | |
$PIP install --no-cache-dir --upgrade pip setuptools wheel | |
# Work around https://github.com/pypa/setuptools_scm/issues/713 until pip releases a fix | |
$PIP install --no-cache-dir --upgrade git+https://github.com/pypa/pip.git | |
printf '[libs]\nsystem_freetype = True\n' > /tmp/mpl_setup.cfg | |
export MPLSETUPCFG=/tmp/mpl_setup.cfg | |
export LLVM_CONFIG=llvm-config-11 | |
export NPY_NUM_BUILD_JOBS=$(nproc) | |
$PIP install --no-cache-dir --no-binary :all: numba | |
$PIP install --no-cache-dir --no-binary :all: numpy | |
$PIP install --no-cache-dir --no-binary :all: cython pybind11 six | |
$PIP install --no-cache-dir --no-binary :all: pythran | |
$PIP install --no-cache-dir --no-binary :all: cftime Bottleneck | |
$PIP install --no-cache-dir --no-binary :all: matplotlib | |
$PIP install --no-cache-dir --no-binary scipy scipy | |
$PIP install --no-cache-dir --no-binary :all: pandas shapely | |
$PIP install --no-cache-dir --no-binary cartopy cartopy | |
$PIP install --no-cache-dir "gdal<$(gdal-config --version | cut -d. -f1).$(( $(gdal-config --version | cut -d. -f2) + 1 ))" --install-option="build_ext" --install-option="$(gdal-config --cflags | sed 's/-I/--include-dirs=/')" | |
$PIP install --no-cache-dir fiona --install-option="build_ext" --install-option="$(gdal-config --cflags | sed 's/-I/--include-dirs=/')" | |
$PIP install --no-cache-dir --no-binary :all: pyproj | |
$PIP install --no-cache-dir --no-binary :all: \ | |
"git+https://github.com/rasterio/rasterio.git@1.3b1" \ | |
descartes \ | |
Pillow \ | |
geopandas \ | |
netCDF4 \ | |
"git+https://github.com/PyTables/PyTables.git" \ | |
configobj \ | |
joblib \ | |
dask \ | |
distributed \ | |
xarray \ | |
rioxarray \ | |
nose \ | |
filelock \ | |
pytest \ | |
pytest-cov \ | |
ilock \ | |
progressbar2 \ | |
motionless \ | |
versioneer \ | |
requests \ | |
tifffile \ | |
"git+https://github.com/OGGM/pytest-mpl.git" \ | |
"git+https://github.com/fmaussion/salem.git" | |
$PIP install --no-cache-dir --no-binary scikit-image,scikit-learn scikit-image scikit-learn | |
sed -i 's/^backend.*/backend : Agg/' "$(python3 -c "import matplotlib, os; print(os.path.dirname(matplotlib.__file__))")"/mpl-data/matplotlibrc | |
$PIP install --no-cache-dir --no-binary :all: git+https://github.com/OGGM/oggm.git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment