Skip to content

Commit

Permalink
Install dependencies via pip instead of conda (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
fmaussion committed Jan 13, 2019
1 parent 544797c commit 05b413f
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 39 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# OGGM-edu

Educational material about glaciers, powered by [OGGM](https://oggm.org) and [Binder](https://mybinder.org/)
Educational material about glaciers, powered by [OGGM](https://oggm.org) and [Binder](https://mybinder.org/).

Web: http://edu.oggm.org
15 changes: 15 additions & 0 deletions binder/apt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
build-essential
python-pip
liblapack-dev
gfortran
libproj-dev
python-setuptools
tk-dev
python3-tk
python3-dev
gdal-bin
libgdal-dev
python-gdal
netcdf-bin
ncview
python-netcdf4
File renamed without changes.
42 changes: 42 additions & 0 deletions binder/postBuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

# Add packages
pip install gdal=="$(gdal-config --version)" --install-option="build_ext" --install-option="$(gdal-config --cflags | sed 's/-I/--include-dirs=/')"
pip install fiona --install-option="build_ext" --install-option="$(gdal-config --cflags | sed 's/-I/--include-dirs=/')"
pip install pyproj
pip install geopandas
pip install rasterio
pip install pyviz_comms
pip install bokeh
pip install param
pip install holoviews
pip install pyct
pip install panel
pip install parambokeh
pip install datashader
pip install descartes
pip install salem
pip install git+https://github.com/OGGM/oggm.git

# Jupyterlab
pip install ipympl
jupyter labextension install @jupyter-widgets/jupyterlab-manager
jupyter labextension install jupyter-matplotlib
jupyter labextension install @pyviz/jupyterlab_holoviews

# Add funny font
mkdir ~/.fonts
wget http://antiyawn.com/uploads/Humor-Sans-1.0.ttf
mv Humor-Sans-1.0.ttf ~/.fonts/Humor-Sans-1.0.ttf
cd ~/.fonts/
fc-cache -f -v

# Back to home
cd ~

# run matplotlib once to generate the font cache
python -c "import matplotlib as mpl; mpl.use('Agg'); import pylab as plt; fig, ax = plt.subplots(); fig.savefig('test.png')"
test -e test.png && rm test.png

# Get the OGGM data
python binder/download_cache.py
18 changes: 18 additions & 0 deletions binder/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
numpy
scipy
pandas
shapely
matplotlib
Pillow
netcdf4
scikit-image
configobj
joblib
xarray
boto3
progressbar2
pytest
motionless
dask
bottleneck
ipython
20 changes: 0 additions & 20 deletions environment.yml

This file was deleted.

18 changes: 0 additions & 18 deletions postBuild

This file was deleted.

0 comments on commit 05b413f

Please sign in to comment.