Skip to content

Commit

Permalink
docker setup: move the env variable setup to "start"
Browse files Browse the repository at this point in the history
  • Loading branch information
megies committed Oct 23, 2019
1 parent 5991f21 commit 41f2e2f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
11 changes: 7 additions & 4 deletions postBuild
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# -*- coding: utf-8 -*-
#!/bin/bash
# Things to run once after the docker base image is pulled

# update notebooks
cd /home/jovyan/seismo_live
cd $HOME/seismo_live
git fetch origin
git reset --hard origin/master

# XXX ugly hack to try and work around proj env issues
# XXX https://github.com/conda-forge/basemap-feedstock/issues/30
export PROJ_LIB=/opt/conda/share/proj/
# only expose notebooks in the jupyter home dir
rm -rf $HOME/work
mv $HOME/seismo_live/notebooks/* $HOME/
rm -rf $HOME/seismo_live
12 changes: 12 additions & 0 deletions start
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
#!/bin/bash
# Code that runs before the user sessions starts
# E.g. set env variables here
# See: https://mybinder.readthedocs.io/en/latest/config_files.html#id15

# XXX ugly hack to try and work around proj env issues
# XXX https://github.com/conda-forge/basemap-feedstock/issues/30
export PROJ_LIB=/opt/conda/share/proj/

# This has to be here to start the common binder startup at the end
exec "$@"

0 comments on commit 41f2e2f

Please sign in to comment.