diff --git a/.build/Dockerfile b/.build/Dockerfile index dacaea2..222e9f3 100755 --- a/.build/Dockerfile +++ b/.build/Dockerfile @@ -429,9 +429,10 @@ RUN conda install -c conda-forge jupyter_contrib_nbextensions && \ jupyter nbextension enable codefolding/main RUN jupyter labextension install @ijmbarr/jupyterlab_spellchecker -# Copying config and fix permissions -COPY jupyter_notebook_config.json /etc/jupyter/ + RUN fix-permissions /home/$NB_USER # Switch back to jovyan to avoid accidental container runs as root USER $NB_UID + +COPY jupyter_notebook_config.json /etc/jupyter/ diff --git a/generate_Dockerfile.sh b/generate_Dockerfile.sh index 41a2b52..5d3cd21 100755 --- a/generate_Dockerfile.sh +++ b/generate_Dockerfile.sh @@ -72,7 +72,12 @@ cat src/Dockerfile.usefulpackages >> $DOCKERFILE # Copy the demo notebooks and change permissions cp -r extra/Getting_Started data chmod -R 755 data/ + +# Copying config and fix permissions cp src/jupyter_notebook_config.json .build/ +echo >> $DOCKERFILE +echo "COPY jupyter_notebook_config.json /etc/jupyter/" >> $DOCKERFILE + #cp $(find $(dirname $DOCKERFILE) -type f | grep -v $STACKS_DIR | grep -v .gitkeep) . echo "GPU Dockerfile was generated sucessfully in file ${DOCKERFILE}." diff --git a/src/Dockerfile.usefulpackages b/src/Dockerfile.usefulpackages index 4cbe6e8..1fa9fbc 100644 --- a/src/Dockerfile.usefulpackages +++ b/src/Dockerfile.usefulpackages @@ -40,8 +40,6 @@ RUN conda install -c conda-forge jupyter_contrib_nbextensions && \ jupyter nbextension enable codefolding/main RUN jupyter labextension install @ijmbarr/jupyterlab_spellchecker -# Copying config and fix permissions -COPY jupyter_notebook_config.json /etc/jupyter/ RUN fix-permissions /home/$NB_USER # Switch back to jovyan to avoid accidental container runs as root