-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move environment setup from start.sh
to ENTRYPOINT instead of CMD
#1528
Labels
type:Enhancement
A proposed enhancement to the docker images
Milestone
Comments
This issue has been mentioned on Jupyter Community Forum. There might be relevant details there: |
This issue has been mentioned on Jupyter Community Forum. There might be relevant details there: |
mathbunnyru
changed the title
Move environment setup from
[ENH] - Move environment setup from Aug 28, 2023
start-notebook.sh
to ENTRYPOINT instead of CMDstart-notebook.sh
to ENTRYPOINT instead of CMD
mathbunnyru
changed the title
[ENH] - Move environment setup from
Move environment setup from Sep 10, 2023
start-notebook.sh
to ENTRYPOINT instead of CMDstart-notebook.sh
to ENTRYPOINT instead of CMD
3 tasks
mathbunnyru
changed the title
Move environment setup from
Move environment setup from Jan 7, 2024
start-notebook.sh
to ENTRYPOINT instead of CMDstart.sh
to ENTRYPOINT instead of CMD
manics
added a commit
to manics/jupyter-docker-stacks
that referenced
this issue
Jan 21, 2024
manics
added a commit
to manics/jupyter-docker-stacks
that referenced
this issue
Jan 21, 2024
manics
added a commit
to manics/jupyter-docker-stacks
that referenced
this issue
Jan 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What docker images this feature is applicable to?
jupyter/base-notebook
What changes do you propose?
Split
start-notebook.sh
orstart.sh
into a script that does the environment setup in an ENTRYPOINT, and a script that does the actual notebook startup in CMD.Originally suggested in jupyterhub/zero-to-jupyterhub-k8s#2138 (comment)
How does this change will affect users?
start-notebook.sh
callsstart.sh
which handles a lot of setup in the Jupyter environment, including:docker-stacks/base-notebook/start.sh
Line 44 in 8dfdbfd
docker-stacks/base-notebook/start.sh
Lines 46 to 51 in 8dfdbfd
Since
start-notebook.sh
is set as the CMD if someone passes any arguments when running the Docker container all this setup is ignored. For exampledocker run -e NB_UID=12345 -u 0 jupyter/base-notebook jupyter-lab --debug
should change the UID from the default
1000
to12345
, but since the startup scripts aren't run this leads to an error (can't be run as root). Instead you must rundocker run -e NB_UID=12345 -u 0 jupyter/base-notebook start.sh jupyter-lab --debug
A concrete example of where this is a problem for users is in the pyspark notebook- it isn't obvious to a user that the pyspark environment is setup by a startup script rather than being baked into the Dockerfile.
docker-stacks/pyspark-notebook/Dockerfile
Line 48 in 8dfdbfd
Note we're working around this in JupyterHub 2.0 and Z2JH 2.0 with a breaking change: jupyterhub/zero-to-jupyterhub-k8s#2449
Instead of specifying
jupyterhub-singleuser
as the CMD when running the image we'll use the image's default CMD, but I think this change is still generally helpful.The text was updated successfully, but these errors were encountered: