mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-11 20:12:58 +00:00
JUPYTER_CMD -> DOCKER_STACKS_JUPYTER_CMD (review)
This commit is contained in:
@@ -78,7 +78,7 @@ We will happily grant additional permissions (e.g., ability to merge PRs) to any
|
|||||||
|
|
||||||
Following [Jupyter Notebook notice](https://github.com/jupyter/notebook#notice), JupyterLab is now the default for all of the Jupyter Docker stack images.
|
Following [Jupyter Notebook notice](https://github.com/jupyter/notebook#notice), JupyterLab is now the default for all of the Jupyter Docker stack images.
|
||||||
It is still possible to switch back to Jupyter Notebook (or to launch a different startup command).
|
It is still possible to switch back to Jupyter Notebook (or to launch a different startup command).
|
||||||
This can be done by passing the environment variable `JUPYTER_CMD=notebook` (or any other valid `jupyter` command) at container startup,
|
This can be done by passing the environment variable `DOCKER_STACKS_JUPYTER_CMD=notebook` (or any other valid `jupyter` command) at container startup,
|
||||||
more information is available in the [documentation](https://jupyter-docker-stacks.readthedocs.io/en/latest/using/common.html#docker-options).
|
more information is available in the [documentation](https://jupyter-docker-stacks.readthedocs.io/en/latest/using/common.html#docker-options).
|
||||||
|
|
||||||
According to the Jupyter Notebook project status and its compatibility with JupyterLab,
|
According to the Jupyter Notebook project status and its compatibility with JupyterLab,
|
||||||
|
@@ -6,7 +6,7 @@ set -e
|
|||||||
|
|
||||||
# The Jupyter command to launch
|
# The Jupyter command to launch
|
||||||
# JupyterLab by default
|
# JupyterLab by default
|
||||||
JUPYTER_CMD="${JUPYTER_CMD:=lab}"
|
DOCKER_STACKS_JUPYTER_CMD="${DOCKER_STACKS_JUPYTER_CMD:=lab}"
|
||||||
|
|
||||||
if [[ -n "${JUPYTERHUB_API_TOKEN}" ]]; then
|
if [[ -n "${JUPYTERHUB_API_TOKEN}" ]]; then
|
||||||
echo "WARNING: using start-singleuser.sh instead of start-notebook.sh to start a server associated with JupyterHub."
|
echo "WARNING: using start-singleuser.sh instead of start-notebook.sh to start a server associated with JupyterHub."
|
||||||
@@ -19,8 +19,8 @@ if [[ "${RESTARTABLE}" == "yes" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -v JUPYTER_ENABLE_LAB ]]; then
|
if [[ -v JUPYTER_ENABLE_LAB ]]; then
|
||||||
echo "WARNING: JUPYTER_ENABLE_LAB is ignored, use JUPYTER_CMD if you want to change the command used to start the server"
|
echo "WARNING: JUPYTER_ENABLE_LAB is ignored, use DOCKER_STACKS_JUPYTER_CMD if you want to change the command used to start the server"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# shellcheck disable=SC1091,SC2086
|
# shellcheck disable=SC1091,SC2086
|
||||||
exec /usr/local/bin/start.sh ${wrapper} jupyter ${JUPYTER_CMD} ${NOTEBOOK_ARGS} "$@"
|
exec /usr/local/bin/start.sh ${wrapper} jupyter ${DOCKER_STACKS_JUPYTER_CMD} ${NOTEBOOK_ARGS} "$@"
|
||||||
|
@@ -23,11 +23,11 @@ LOGGER = logging.getLogger(__name__)
|
|||||||
["WARNING: JUPYTER_ENABLE_LAB is ignored"],
|
["WARNING: JUPYTER_ENABLE_LAB is ignored"],
|
||||||
),
|
),
|
||||||
(None, "jupyter lab", True, []),
|
(None, "jupyter lab", True, []),
|
||||||
(["JUPYTER_CMD=lab"], "jupyter lab", True, []),
|
(["DOCKER_STACKS_JUPYTER_CMD=lab"], "jupyter lab", True, []),
|
||||||
(["RESTARTABLE=yes"], "run-one-constantly jupyter lab", True, []),
|
(["RESTARTABLE=yes"], "run-one-constantly jupyter lab", True, []),
|
||||||
(["JUPYTER_CMD=notebook"], "jupyter notebook", True, []),
|
(["DOCKER_STACKS_JUPYTER_CMD=notebook"], "jupyter notebook", True, []),
|
||||||
(["JUPYTER_CMD=server"], "jupyter server", True, []),
|
(["DOCKER_STACKS_JUPYTER_CMD=server"], "jupyter server", True, []),
|
||||||
(["JUPYTER_CMD=nbclassic"], "jupyter nbclassic", True, []),
|
(["DOCKER_STACKS_JUPYTER_CMD=nbclassic"], "jupyter nbclassic", True, []),
|
||||||
(
|
(
|
||||||
["JUPYTERHUB_API_TOKEN=my_token"],
|
["JUPYTERHUB_API_TOKEN=my_token"],
|
||||||
"jupyterhub-singleuser",
|
"jupyterhub-singleuser",
|
||||||
|
@@ -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.)
|
(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.**
|
**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 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_CMD=<jupyter command>` - Instructs the startup script to run `jupyter ${JUPYTER_CMD}` instead of the default `jupyter lab` command.
|
- `-e DOCKER_STACKS_JUPYTER_CMD=<jupyter command>` - Instructs the startup script to run `jupyter ${DOCKER_STACKS_JUPYTER_CMD}` instead of the default `jupyter lab` command.
|
||||||
See [Switching back to classic notebook or using a different startup command][switch_back] for available options.
|
See [Switching back to classic notebook or using a different startup command][switch_back] for available options.
|
||||||
Useful in container orchestration environments where setting environment variables is easier than change command line parameters.
|
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.
|
- `-e RESTARTABLE=yes` - Runs Jupyter in a loop so that quitting Jupyter does not cause the container to exit.
|
||||||
@@ -135,11 +135,11 @@ For additional information about using SSL, see the following:
|
|||||||
|
|
||||||
JupyterLab built on top of Jupyter Server is now the default for all images of the stack.
|
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.
|
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.
|
This can be done by setting the environment variable `DOCKER_STACKS_JUPYTER_CMD` at container startup.
|
||||||
The table below shows some options.
|
The table below shows some options.
|
||||||
|
|
||||||
| `JUPYTER_CMD` | Backend | Frontend |
|
| `DOCKER_STACKS_JUPYTER_CMD` | Backend | Frontend |
|
||||||
| --------------- | ---------------- | ---------------- |
|
| --------------------------- | ---------------- | ---------------- |
|
||||||
| `lab` (default) | Jupyter Server | JupyterLab |
|
| `lab` (default) | Jupyter Server | JupyterLab |
|
||||||
| `notebook` | Jupyter Notebook | Jupyter Notebook |
|
| `notebook` | Jupyter Notebook | Jupyter Notebook |
|
||||||
| `nbclassic` | Jupyter Server | Jupyter Notebook |
|
| `nbclassic` | Jupyter Server | Jupyter Notebook |
|
||||||
@@ -155,12 +155,12 @@ Example:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Run Jupyter Notebook classic
|
# Run Jupyter Notebook classic
|
||||||
docker run -it --rm -p 8888:8888 -e JUPYTER_CMD=notebook \
|
docker run -it --rm -p 8888:8888 -e DOCKER_STACKS_JUPYTER_CMD=notebook \
|
||||||
jupyter/base-notebook
|
jupyter/base-notebook
|
||||||
# Executing the command: jupyter notebook ...
|
# Executing the command: jupyter notebook ...
|
||||||
|
|
||||||
# Run Jupyter Notebook on Jupyter Server
|
# Run Jupyter Notebook on Jupyter Server
|
||||||
docker run -it --rm -p 8888:8888 -e JUPYTER_CMD=nbclassic
|
docker run -it --rm -p 8888:8888 -e DOCKER_STACKS_JUPYTER_CMD=nbclassic \
|
||||||
jupyter/base-notebook
|
jupyter/base-notebook
|
||||||
# Executing the command: jupyter nbclassic ...
|
# Executing the command: jupyter nbclassic ...
|
||||||
```
|
```
|
||||||
|
Reference in New Issue
Block a user