@@ -142,8 +142,6 @@ ENV PYTHONDONTWRITEBYTECODE=true
142142RUN conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main \
143143 && conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r
144144
145- # RUN conda init bash \
146- # && . ~/.bashrc \
147145RUN conda env create --prefix $CONDA_ENV_HOME --file $CONDA_FILES/conda-environment.yaml \
148146 # Remove packages tarballs and python bytecode files from the image
149147 && conda clean -afy \
@@ -203,24 +201,32 @@ RUN $JUPYTER_HOME/bin/jupyter kernelspec remove python3 -y
203201
204202# #######################
205203# # Terra-specific Utilities
206- # #######################
207- # copy over jupyter extensions and kernel config files
208- COPY jupyter/ $JUPYTER_HOME
204+ # ####################### \
205+
206+ ]# Copy over utility scripts and config files
207+ ENV JUPYTER_SCRIPTS $JUPYTER_HOME/scripts
208+ ENV JUPYTER_CUSTOM $JUPYTER_HOME/custom
209+ ENV JUPYTER_EXTENSIONS $JUPYTER_SCRIPTS/extension
210+ ENV JUPYTER_KERNEL $JUPYTER_SCRIPTS/kernel
211+
212+ COPY scripts $JUPYTER_HOME/scripts
213+ COPY custom $JUPYTER_HOME/custom
214+ COPY jupyter_notebook_config.py $JUPYTER_HOME
209215
210216# give user ownership of jupyter home and conda env home
211217# and make extension files executable
212218RUN chown -R $USER:users $JUPYTER_HOME $CONDA_HOME \
213- && find $JUPYTER_HOME/extensions/scripts -name '*.sh' -type f | xargs chmod +x
219+ && find $JUPYTER_EXTENSIONS -name '*.sh' -type f | xargs chmod +x
214220
215221# make the run-jupyter script executable
216- RUN chmod +x -R $JUPYTER_HOME /run-jupyter.sh
222+ RUN chmod +x -R $JUPYTER_SCRIPTS /run-jupyter.sh
217223
218224# Setup jupyter and r kernels
219225ENV JUPYTER_KERNELSPEC_DIR=/usr/local/share/jupyter/
220226RUN chown -R $USER:users $JUPYTER_KERNELSPEC_DIR \
221- && find $JUPYTER_HOME/kernel -name '*.sh' -type f | xargs chmod +x \
227+ && find $JUPYTER_KERNEL -name '*.sh' -type f | xargs chmod +x \
222228 # You can get kernel directory by running `jupyter kernelspec list`
223- && $JUPYTER_HOME/kernel/ kernelspec.sh $JUPYTER_HOME/kernel $JUPYTER_KERNELSPEC_DIR/kernels
229+ && $JUPYTER_KERNEL/ kernelspec.sh $JUPYTER_KERNEL $JUPYTER_KERNELSPEC_DIR/kernels
224230
225231# Create the welder user
226232# The welder uid is consistent with the Welder docker definition here:
0 commit comments