Update documentation

This commit is contained in:
romainx
2022-01-20 09:35:20 +01:00
parent 1178c33e27
commit 554ab113b1
5 changed files with 27 additions and 23 deletions

View File

@@ -69,7 +69,7 @@ You do so by passing arguments to the `docker run` command.
(The `start-notebook.sh` script will `su ${NB_USER}` after adding `${NB_USER}` to sudoers.)
**You should only enable `sudo` if you trust the user or if the container is running on an isolated host.**
- `-e GEN_CERT=yes` - Instructs the startup script to generates a self-signed SSL certificate and configure Jupyter Notebook to use it to accept encrypted HTTPS connections.
- `-e JUPYTER_ENABLE_LAB=yes` - Instructs the startup script to run `jupyter lab` instead of the default `jupyter notebook` command.
- `-e JUPYTER_CMD=yes` - Instructs the startup script to run `jupyter ${JUPYTER_CMD}` instead of the default `jupyter lab` command.
Useful in container orchestration environments where setting environment variables is easier than change command line parameters.
- `-e RESTARTABLE=yes` - Runs Jupyter in a loop so that quitting Jupyter does not cause the container to exit.
This may be useful when you need to install extensions that require restarting Jupyter.

View File

@@ -137,13 +137,28 @@ ENV PATH "${CONDA_DIR}/envs/${conda_env}/bin:${PATH}"
# ENV CONDA_DEFAULT_ENV ${conda_env}
```
## Run JupyterLab
## Switching back to classic notebook or using a different startup command
JupyterLab is preinstalled as a notebook extension starting in tag
[c33a7dc0eece](https://github.com/jupyter/docker-stacks/pull/355).
JupyterLab built on top of Jupyter Server is now the default for all images of the stack.
However, it is still possible to switch back to the classic notebook or to use a different startup command.
This can be done by setting the environment variable `JUPYTER_CMD` at container startup.
Run jupyterlab using a command such as
`docker run -it --rm -p 8888:8888 -e JUPYTER_ENABLE_LAB=yes jupyter/datascience-notebook`
- `JUPYTER_CMD=notebook`: Start Jupyter Notebook frontend and backend.
- `JUPYTER_CMD=nbclassic`: Start Jupyter Notebook frontend and Jupyter Server backend.
_Note: Any other valid `jupyter` command that starts the Jupyter server can be used._
Example:
```bash
# Run Jupyter Notebook classic
docker run -it --rm -p 8888:8888 -e JUPYTER_CMD=notebook jupyter/base-notebook
# Executing the command: jupyter notebook
# Run Jupyter Notebook on Jupyter Server
docker run -it --rm -p 8888:8888 -e JUPYTER_CMD=nbclassic jupyter/base-notebook
# Executing the command: jupyter nbclassic
```
## Dask JupyterLab Extension