Skip to content
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

Merged
merged 2 commits into from
Feb 1, 2018

Conversation

clkao
Copy link
Contributor

@clkao clkao commented Jan 28, 2018

Closes #531.

@parente
Copy link
Member

parente commented Jan 28, 2018

@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.

@clkao
Copy link
Contributor Author

clkao commented Jan 28, 2018

@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
Copy link
Member

parente commented Jan 28, 2018

@clkao If there's documentation in JupyterHub or the jupyterhub-lab extension that describes the environment variables and when it's set, we should point to that in the READMEs. That involves updating all of the READMEs at the moment since #538 is still a work in progress.

@clkao clkao changed the title jupyterhub-lab support will be enabled if $JUPYTERHUB_ENABLE_LAB is set. jupyterhub-lab support will be enabled if $JUPYTER_ENABLE_LAB is set. Jan 30, 2018
@clkao
Copy link
Contributor Author

clkao commented Jan 30, 2018

@parente I've cleaned up this a bit to use JUPYTER_ENABLE_LAB, which is more general for enabling lab via env for both standalone notebook and hub. Let me know if the base-notebook README changes are fine and I'll copy to other READMEs.

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
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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.

@parente
Copy link
Member

parente commented Feb 1, 2018

@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.

@parente parente merged commit 9089b66 into jupyter:master Feb 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants