Skip to content

Commit

Permalink
fix: move chmod to after activation command in jupyter/Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
spool committed Dec 11, 2023
1 parent 3ffaced commit 98f2ce1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions compose/jupyter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,18 @@ COPY --chown=${NB_UID}:${NB_GID} . .


# Switch to default jupyter user
USER ${NB_UID}
# USER ${NB_UID}
# Add custom activate script to reflect environment
# USER root
RUN activate_custom_env_script=/usr/local/bin/before-notebook.d/activate_custom_env.sh && \
echo "#!/bin/bash" > ${activate_custom_env_script} && \
echo "eval \"$(conda shell.bash activate "${env_name}")\"" >> ${activate_custom_env_script} && \
chmod +x ${activate_custom_env_script}

RUN chown -R ${NB_UID}:${NB_GID} .

# Switch to default jupyter user
# USER ${NB_UID}
USER ${NB_UID}

# This eases running shell commands outside docker following:
# https://pythonspeed.com/articles/activate-conda-dockerfile/
Expand Down

0 comments on commit 98f2ce1

Please sign in to comment.