-
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
jupyterhub-lab support will be enabled if $JUPYTER_ENABLE_LAB is set. #539
Conversation
@clkao thanks for looking into this. Is that environment variable set by JupyterHub automatically? If so, great. If not, we prefer documenting how users may change the start command instead of introducing a custom env var that we have to support long term. |
@parente Yes I should add this to the Notebook Options section in README. It seem I should be adding to all of them? Just want to make sure sure that they are not rendered by templates somewhere else. |
@parente I've cleaned up this a bit to use |
You can launch [JupyterLab](https://github.com/jupyterlab/jupyterlab) by setting `JUPYTER_ENABLE_LAB`: | ||
|
||
``` | ||
docker run -it --rm -e JUPYTER_ENABLE_LAB=1 --rm -p 8888:8888 jupyter/base-notebook |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Later in the READMEs we document the following way to start JupyterLab instead of Notebook in these images with:
docker run -it --rm -p 8888:8888 jupyter/base-notebook start.sh jupyter lab
I'm thinking we should extend the start-singleuser script to accept an alternative command like start.sh does like so:
# defaults to the original behavior of running jupyterhub-singleuser
docker run -it --rm -p 8888:8888 jupyter/base-notebook start-singleuser.sh
# overrides the command to run jupyter labhub instead
docker run -it --rm -p 8888:8888 jupyter/base-notebook start-singleuser.sh jupyter labhub
That way we can avoid introducing a env var that we have to maintain as a special feature of the stack images. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That works too. I still think env var is somewhat less intrusive though. Image you have a jupyterhub with multiple images that some have lab installed, and some might be older ones. Setting the env var now suggests using jupyterlab whenever it is available.
If we require the spawner to specify singleuser_cmd, people using formspawner/profilesspawner will need to carefully select the appropriate start command for individual image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clarification about the use case. I think the env var makes sense, now that I understand some images might have the env var set while others may not.
@clkao LGTM. I think the addition to the base-notebook README is fine for now in hopes that we'll have a consolidated ReadTheDocs site soon. |
Closes #531.