From 8ed9823295117b12b4124fd4a57af31fb82bae5c Mon Sep 17 00:00:00 2001 From: Anne Fouilloux Date: Wed, 27 Nov 2019 09:27:02 +0100 Subject: [PATCH] create a separate conda env for esmvaltool --- Dockerfile | 22 +++++++++++++--------- jupyterhub_environment.yml | 27 +++++++++++---------------- 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/Dockerfile b/Dockerfile index fcfe816..9c31e5c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,16 +9,20 @@ RUN apt-get update && apt-get install -y vim # Install requirements for Python 3 ADD jupyterhub_environment.yml jupyterhub_environment.yml -RUN conda env update -f jupyterhub_environment.yml +RUN conda env create -f jupyterhub_environment.yml -RUN /opt/conda/bin/jupyter labextension install @jupyterlab/hub-extension @jupyter-widgets/jupyterlab-manager -RUN /opt/conda/bin/nbdime extensions --enable -RUN /opt/conda/bin/jupyter labextension install jupyterlab-datawidgets nbdime-jupyterlab dask-labextension -RUN /opt/conda/bin/jupyter labextension install @jupyter-widgets/jupyterlab-sidecar -RUN /opt/conda/bin/jupyter serverextension enable jupytext -RUN /opt/conda/bin/jupyter nbextension install --py jupytext -RUN /opt/conda/bin/jupyter nbextension enable --py jupytext -RUN /opt/conda/bin/jupyter labextension install @pyviz/jupyterlab_pyviz jupyter-leaflet +RUN source activate esmvaltool && \ + /opt/conda/bin/ipython kernel install --user --name esmvaltool && \ + /opt/conda/bin/python -m ipykernel install --user --name=esmvaltool && \ + /opt/conda/bin/jupyter labextension install @jupyterlab/hub-extension \ + @jupyter-widgets/jupyterlab-manager && \ + /opt/conda/bin/jupyter labextension install jupyterlab-datawidgets && \ + /opt/conda/bin/jupyter labextension install @jupyter-widgets/jupyterlab-sidecar && \ + /opt/conda/bin/jupyter labextension install @pyviz/jupyterlab_pyviz \ + jupyter-leaflet + +# Fix hub failure +RUN fix-permissions $HOME # Install other packages USER notebook diff --git a/jupyterhub_environment.yml b/jupyterhub_environment.yml index d95d3ac..8383b95 100644 --- a/jupyterhub_environment.yml +++ b/jupyterhub_environment.yml @@ -1,20 +1,19 @@ -name: base +name: esmvaltool channels: - - esmvalgroup + - esmvalgroup - conda-forge - - bioconda - defaults dependencies: - numpy - xarray - pandas - - cartopy - - matplotlib - - seaborn + - cartopy + - matplotlib + - seaborn - basemap - - geopy + - geopy - netcdf4 - cis - metpy @@ -29,21 +28,17 @@ dependencies: - pillow - branca - geopandas - - psyplot - - psy-maps - - psyplot-gui - - psy-reg - - cdsapi - - folium + - cdsapi + - folium + - esmvaltool - basemap-data-hires - rasterstats - cfgrib - cdo - nco - - jupytext - - rise - papermill - - esmvaltool + - jupytext + - pip - pip: - dask_labextension - ipydatawidgets