-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
44 lines (35 loc) · 1.62 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM quay.io/uninett/jupyterhub-singleuser:20191012-5691f5c
MAINTAINER Anne Fouilloux <[email protected]>
# Install packages
USER root
RUN apt-get update && apt-get install -y vim
# Install requirements for Python 3
ADD jupyterhub_environment.yml jupyterhub_environment.yml
RUN conda env create -f jupyterhub_environment.yml
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
# Install requirements for cesm
ADD cesm_environment.yml cesm_environment.yml
# Python packages
RUN conda env create -f cesm_environment.yml && conda clean -yt
RUN ["/bin/bash" , "-c", ". /opt/conda/etc/profile.d/conda.sh && \
conda activate cesm && \
python -m pip install ipykernel && \
ipython kernel install --user --name cesm && \
python -m ipykernel install --user --name=cesm && \
jupyter labextension install @jupyterlab/hub-extension \
@jupyter-widgets/jupyterlab-manager && \
jupyter labextension install jupyterlab-datawidgets && \
conda deactivate && \
conda init bash"]
# Fix hub failure
RUN fix-permissions $HOME
# Install other packages
USER notebook