From f4d46a7f3cd9f4aa131e02c7eaba6567462a5dad Mon Sep 17 00:00:00 2001 From: Borun Chowdhury Date: Tue, 22 Sep 2020 22:03:07 +0200 Subject: [PATCH 1/4] changed environment to dask-tutorial --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index 073cfc4..c9f730e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,3 +9,7 @@ USER jovyan RUN git clone https://github.com/dask/dask-tutorial.git ./dask-tutorial RUN cd dask-tutorial && conda env update -f binder/environment.yml && . binder/postBuild && cd .. RUN rm dask-tutorial/github_deploy_key_dask_dask_tutorial.enc + +RUN echo "source activate dask-tutorial" > ~/.bashrc +ENV PATH /opt/conda/envs/dask-tutorial/bin:$PATH + From c404d669a67b00cecc9febd3e7f72098540e0679 Mon Sep 17 00:00:00 2001 From: Borun Chowdhury Date: Wed, 23 Sep 2020 12:31:53 +0200 Subject: [PATCH 2/4] Modified jupyter kernelspec to point to the correct kernel --- Dockerfile | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c9f730e..8e78ab4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,22 @@ RUN git clone https://github.com/dask/dask-tutorial.git ./dask-tutorial RUN cd dask-tutorial && conda env update -f binder/environment.yml && . binder/postBuild && cd .. RUN rm dask-tutorial/github_deploy_key_dask_dask_tutorial.enc -RUN echo "source activate dask-tutorial" > ~/.bashrc +# The notebooks are configured to use kernel python3 +# We want them to use the kernel dask-tutorial +# So we switch kernels + +SHELL ["conda","run","-n","dask-tutorial","/bin/bash","-c"] +RUN jupyter kernelspec remove -f python3 +RUN python -m ipykernel install --user --name python3 --display-name "Python 3" + +# Shell into the container takes us to the correct environment + +RUN conda init +RUN echo "conda activate dask-tutorial" >> ~/.bashrc + +# If we do not launch jupyter using the correct environment it +# leads to a failure to list clusters suggesting to check if extensions +# are installed/enabled + ENV PATH /opt/conda/envs/dask-tutorial/bin:$PATH From c096e18c8cdaef8c56219a521e77667f0ee9ccc1 Mon Sep 17 00:00:00 2001 From: Borun Chowdhury Date: Thu, 24 Sep 2020 11:54:03 +0200 Subject: [PATCH 3/4] the postBuild script is called in the correct environment --- Dockerfile | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8e78ab4..876f3e2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ RUN apt-get update && apt-get install -y graphviz USER jovyan RUN git clone https://github.com/dask/dask-tutorial.git ./dask-tutorial -RUN cd dask-tutorial && conda env update -f binder/environment.yml && . binder/postBuild && cd .. +RUN cd dask-tutorial && conda env update -f binder/environment.yml && cd .. RUN rm dask-tutorial/github_deploy_key_dask_dask_tutorial.enc # The notebooks are configured to use kernel python3 @@ -15,6 +15,7 @@ RUN rm dask-tutorial/github_deploy_key_dask_dask_tutorial.enc # So we switch kernels SHELL ["conda","run","-n","dask-tutorial","/bin/bash","-c"] +RUN . dask-tutorial/binder/postBuild RUN jupyter kernelspec remove -f python3 RUN python -m ipykernel install --user --name python3 --display-name "Python 3" @@ -23,9 +24,3 @@ RUN python -m ipykernel install --user --name python3 --display-name "Python 3" RUN conda init RUN echo "conda activate dask-tutorial" >> ~/.bashrc -# If we do not launch jupyter using the correct environment it -# leads to a failure to list clusters suggesting to check if extensions -# are installed/enabled - -ENV PATH /opt/conda/envs/dask-tutorial/bin:$PATH - From ddaa1a4219eb403cb52003bd2fbb82a32c9fc839 Mon Sep 17 00:00:00 2001 From: James Bourbeau Date: Fri, 6 Nov 2020 13:04:06 -0600 Subject: [PATCH 4/4] Update base environment --- Dockerfile | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index 876f3e2..e7e035e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,26 +1,11 @@ -FROM jupyter/scipy-notebook:1386e2046833 +FROM jupyter/base-notebook:lab-2.2.5 USER root # python3 setup -RUN apt-get update && apt-get install -y graphviz +RUN apt-get update && apt-get install -y graphviz git USER jovyan RUN git clone https://github.com/dask/dask-tutorial.git ./dask-tutorial -RUN cd dask-tutorial && conda env update -f binder/environment.yml && cd .. +RUN cd dask-tutorial && conda env update -n base -f binder/environment.yml --prune && . binder/postBuild && cd .. RUN rm dask-tutorial/github_deploy_key_dask_dask_tutorial.enc - -# The notebooks are configured to use kernel python3 -# We want them to use the kernel dask-tutorial -# So we switch kernels - -SHELL ["conda","run","-n","dask-tutorial","/bin/bash","-c"] -RUN . dask-tutorial/binder/postBuild -RUN jupyter kernelspec remove -f python3 -RUN python -m ipykernel install --user --name python3 --display-name "Python 3" - -# Shell into the container takes us to the correct environment - -RUN conda init -RUN echo "conda activate dask-tutorial" >> ~/.bashrc -