Launch Jupyter Lab from Jupyter Docker image

Hi,

I am running the jupyter/base-notebook docker image. My objective is to launch Jupyter Lab instead of Jupyter Notebook out of that container. For that, I use the following docker run command:

sudo docker run -p 9999:8888 -it -e JUPYTER_ENABLE_LAB=yes jupyter/base-notebook:latest

When I access the link provided in the container, the Jupyter Notebook interfaces appears rather than JupyterLab. Any idea what I am missing?

Thanks for the help!
M

Since you have JUPYTER_ENABLE_LAB=yes, you are already running Lab, you just need to go to the correct url to access it. If you try going to localhost:8888/lab/ you should be able to access the Lab interface.

There may be a better method, but one solution would be to add a line in the jupyter_notebook_config.py file that appends the prefix “/lab/” to the default url on launch. To do this, clone the base-notebook repo from docker-stacks and add the following line:
c.NotebookApp.base_url = '/lab/'
right here.

1 Like