Skip to content

Commit df06e24

Browse files
authored
Improve wording in docs about Jupyter Notebook (#1949)
* Improve wording in docs about Jupyter Notebook * Fixes * Better naming * Apply suggestions from code review
1 parent 7c03161 commit df06e24

File tree

16 files changed

+61
-67
lines changed

16 files changed

+61
-67
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ body:
9797
description: |
9898
A clear and concise description of what the bug is.
9999
placeholder: |
100-
Example: No output is visible in the notebook and the notebook server log contains messages about ...
100+
Example: No output is visible in the notebook and the Server log contains messages about ...
101101
validations:
102102
required: true
103103

README.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ You can use a stack image to do any of the following (and more):
1111

1212
- Start a personal Jupyter Server with the JupyterLab frontend (default)
1313
- Run JupyterLab for a team using JupyterHub
14-
- Start a personal Jupyter Notebook server in a local Docker container
14+
- Start a personal Jupyter Server with the Jupyter Notebook frontend in a local Docker container
1515
- Write your own project Dockerfile
1616

1717
## Quick Start
@@ -20,14 +20,14 @@ You can try a [relatively recent build of the jupyter/base-notebook image on myb
2020
by simply clicking the preceding link.
2121
Otherwise, the examples below may help you get started if you [have Docker installed](https://docs.docker.com/get-docker/),
2222
know [which Docker image](https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html) you want to use
23-
and want to launch a single Jupyter Server in a container.
23+
and want to launch a single Jupyter Application in a container.
2424

2525
The [User Guide on ReadTheDocs](https://jupyter-docker-stacks.readthedocs.io/en/latest/) describes additional uses and features in detail.
2626

2727
**Example 1:**
2828

2929
This command pulls the `jupyter/scipy-notebook` image tagged `2023-07-25` from Docker Hub if it is not already present on the local host.
30-
It then starts a container running a Jupyter Server and exposes the container's internal port `8888` to port `10000` of the host machine:
30+
It then starts a container running a Jupyter Server with the JupyterLab frontend and exposes the container's internal port `8888` to port `10000` of the host machine:
3131

3232
```bash
3333
docker run -p 10000:8888 jupyter/scipy-notebook:2023-07-25
@@ -41,12 +41,12 @@ where:
4141
- `hostname` is the name of the computer running Docker
4242
- `token` is the secret token printed in the console.
4343

44-
The container remains intact for restart after the Jupyter Server exits.
44+
The container remains intact for restart after the Server exits.
4545

4646
**Example 2:**
4747

4848
This command pulls the `jupyter/datascience-notebook` image tagged `2023-07-25` from Docker Hub if it is not already present on the local host.
49-
It then starts an _ephemeral_ container running a Jupyter Server and exposes the server on host port 10000.
49+
It then starts an _ephemeral_ container running a Jupyter Server with the JupyterLab frontend and exposes the server on host port 10000.
5050

5151
```bash
5252
docker run -it --rm -p 10000:8888 -v "${PWD}":/home/jovyan/work jupyter/datascience-notebook:2023-07-25
@@ -83,18 +83,13 @@ We'd also like to invite members of the community to help with two maintainer ac
8383
Anyone in the community can jump in and help with these activities anytime.
8484
We will happily grant additional permissions (e.g., the ability to merge PRs) to anyone who shows an ongoing interest in working on the project.
8585

86-
## Jupyter Notebook Deprecation Notice
86+
## Choosing Jupyter frontend
8787

88-
Following [Jupyter Notebook notice](https://github.com/jupyter/notebook#notice), JupyterLab is now the default for all the Jupyter Docker stack images.
88+
JupyterLab is the default for all the Jupyter Docker Stacks images.
8989
It is still possible to switch back to Jupyter Notebook (or to launch a different startup command).
9090
You can achieve this by passing the environment variable `DOCKER_STACKS_JUPYTER_CMD=notebook` (or any other valid `jupyter` subcommand) at container startup;
9191
more information is available in the [documentation](https://jupyter-docker-stacks.readthedocs.io/en/latest/using/common.html#alternative-commands).
9292

93-
According to the Jupyter Notebook project status and its compatibility with JupyterLab,
94-
these Docker images may remove the classic Jupyter Notebook interface altogether in favor of another _classic-like_ UI built atop JupyterLab.
95-
96-
This change is tracked in the issue [#1217](https://github.com/jupyter/docker-stacks/issues/1217); please check its content for more information.
97-
9893
## Alternatives
9994

10095
- [jupyter/repo2docker](https://github.com/jupyterhub/repo2docker) - Turn git repositories into

base-notebook/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
1212

1313
USER root
1414

15-
# Install all OS dependencies for notebook server that starts but lacks all
15+
# Install all OS dependencies for Server that starts but lacks all
1616
# features (e.g., download as all possible file formats)
1717
RUN apt-get update --yes && \
1818
apt-get install --yes --no-install-recommends \
@@ -28,19 +28,19 @@ RUN apt-get update --yes && \
2828

2929
USER ${NB_UID}
3030

31-
# Install Jupyter Notebook, Lab, and Hub
32-
# Generate a notebook server config
31+
# Install JupyterLab, Jupyter Notebook, JupyterHub and NBClassic
32+
# Generate a Jupyter Server config
3333
# Cleanup temporary files
3434
# Correct permissions
3535
# Do all this in a single RUN command to avoid duplicating all of the
3636
# files across image layers when the permissions change
3737
WORKDIR /tmp
3838
RUN mamba install --yes \
39+
'jupyterlab' \
3940
'notebook' \
4041
'jupyterhub' \
41-
'jupyterlab' \
4242
'nbclassic' && \
43-
jupyter notebook --generate-config && \
43+
jupyter server --generate-config && \
4444
mamba clean --all -f -y && \
4545
npm cache clean --force && \
4646
jupyter lab clean && \

base-notebook/jupyter_server_config.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
os.chmod(pem_file, stat.S_IRUSR | stat.S_IWUSR)
5454
c.ServerApp.certfile = pem_file
5555

56-
# Change default umask for all subprocesses of the notebook server if set in
57-
# the environment
56+
# Change default umask for all subprocesses of the Server if set in the environment
5857
if "NB_UMASK" in os.environ:
5958
os.umask(int(os.environ["NB_UMASK"], 8))

binder/README.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"cell_type": "markdown",
2929
"metadata": {},
3030
"source": [
31-
"The notebook server is running as the following user."
31+
"The Server is running as the following user."
3232
]
3333
},
3434
{
@@ -128,7 +128,7 @@
128128
"name": "python",
129129
"nbconvert_exporter": "python",
130130
"pygments_lexer": "ipython3",
131-
"version": "3.9.10"
131+
"version": "3.11.4"
132132
}
133133
},
134134
"nbformat": 4,

docker-stacks-foundation/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
1818

1919
USER root
2020

21-
# Install all OS dependencies for notebook server that starts but lacks all
22-
# features (e.g., download as all possible file formats)
21+
# Install all OS dependencies for Server that starts
22+
# but lacks all features (e.g., download as all possible file formats)
2323
ENV DEBIAN_FRONTEND noninteractive
2424
RUN apt-get update --yes && \
2525
# - apt-get upgrade is run to patch known vulnerabilities in apt-get packages as

docs/contributing/features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Please follow the process below to suggest a new feature for inclusion in one of
2020
Roughly speaking, we evaluate new features based on the following criteria:
2121

2222
- **Usefulness to Jupyter users**: Is the feature generally applicable across domains? Does it work
23-
with Jupyter Notebook, JupyterLab, JupyterHub, etc.?
23+
with JupyterLab, Jupyter Notebook, JupyterHub, etc.?
2424
- **Fit with the image purpose**: Does the feature match the theme of the stack in which it will be
2525
added? Would it fit better in a new community stack?
2626
- **Complexity of build/runtime configuration**: How many lines of code does the feature require

docs/using/common.md

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Common Features
22

3-
Except for `jupyter/docker-stacks-foundation`, a container launched from any Jupyter Docker Stacks image runs a Jupyter Server with a JupyterLab frontend.
3+
Except for `jupyter/docker-stacks-foundation`, a container launched from any Jupyter Docker Stacks image runs a Jupyter Server with the JupyterLab frontend.
44
The container does so by executing a `start-notebook.sh` script.
55
This script configures the internal container environment and then runs `jupyter lab`, passing any command-line arguments received.
66

77
This page describes the options supported by the startup script and how to bypass it to run alternative commands.
88

99
## Jupyter Server Options
1010

11-
You can pass [Jupyter server options](https://jupyter-server.readthedocs.io/en/latest/operators/public-server.html) to the `start-notebook.sh` script when launching the container.
11+
You can pass [Jupyter Server options](https://jupyter-server.readthedocs.io/en/latest/operators/public-server.html) to the `start-notebook.sh` script when launching the container.
1212

13-
1. For example, to secure the Notebook server with a [custom password](https://jupyter-server.readthedocs.io/en/latest/operators/public-server.html#preparing-a-hashed-password)
13+
1. For example, to secure the Jupyter Server with a [custom password](https://jupyter-server.readthedocs.io/en/latest/operators/public-server.html#preparing-a-hashed-password)
1414
hashed using `jupyter_server.auth.passwd()` instead of the default token,
1515
you can run the following (this hash was generated for the `my-password` password):
1616

@@ -19,7 +19,7 @@ You can pass [Jupyter server options](https://jupyter-server.readthedocs.io/en/l
1919
start-notebook.sh --PasswordIdentityProvider.hashed_password='argon2:$argon2id$v=19$m=10240,t=10,p=8$JdAN3fe9J45NvK/EPuGCvA$O/tbxglbwRpOFuBNTYrymAEH6370Q2z+eS1eF4GM6Do'
2020
```
2121

22-
2. To set the [base URL](https://jupyter-server.readthedocs.io/en/latest/operators/public-server.html#running-the-notebook-with-a-customized-url-prefix) of the notebook server, you can run the following:
22+
2. To set the [base URL](https://jupyter-server.readthedocs.io/en/latest/operators/public-server.html#running-the-notebook-with-a-customized-url-prefix) of the Jupyter Server, you can run the following:
2323

2424
```bash
2525
docker run -it --rm -p 8888:8888 jupyter/base-notebook \
@@ -28,7 +28,7 @@ You can pass [Jupyter server options](https://jupyter-server.readthedocs.io/en/l
2828

2929
## Docker Options
3030

31-
You may instruct the `start-notebook.sh` script to customize the container environment before launching the notebook server.
31+
You may instruct the `start-notebook.sh` script to customize the container environment before launching the Server.
3232
You do so by passing arguments to the `docker run` command.
3333

3434
### User-related configurations
@@ -133,7 +133,7 @@ or executables (`chmod +x`) to be run to the paths below:
133133

134134
- `/usr/local/bin/start-notebook.d/` - handled **before** any of the standard options noted above are applied
135135
- `/usr/local/bin/before-notebook.d/` - handled **after** all the standard options noted above are applied
136-
and ran right before the notebook server launches
136+
and ran right before the Server launches
137137

138138
See the `run-hooks` function in the [`jupyter/base-notebook start.sh`](https://github.com/jupyter/docker-stacks/blob/main/docker-stacks-foundation/start.sh)
139139
script for execution details.
@@ -163,7 +163,7 @@ docker run -it --rm -p 8888:8888 \
163163
--ServerApp.certfile=/etc/ssl/notebook.pem
164164
```
165165

166-
In either case, Jupyter Notebook expects the key and certificate to be a **base64 encoded text file**.
166+
In either case, Jupyter Server expects the key and certificate to be a **base64 encoded text file**.
167167
The certificate file or PEM may contain one or more certificates (e.g., server, intermediate, and root).
168168

169169
For additional information about using SSL, see the following:
@@ -174,7 +174,7 @@ For additional information about using SSL, see the following:
174174
- The [`jupyter_server_config.py`](https://github.com/jupyter/docker-stacks/blob/main/base-notebook/jupyter_server_config.py)
175175
file for how this Docker image generates a self-signed certificate.
176176
- The [Jupyter Server documentation](https://jupyter-server.readthedocs.io/en/latest/operators/public-server.html#securing-a-jupyter-server)
177-
for best practices about securing a public notebook server in general.
177+
for best practices about securing a public Server in general.
178178

179179
## Alternative Commands
180180

@@ -184,31 +184,32 @@ JupyterLab, built on top of Jupyter Server, is now the default for all the image
184184
However, switching back to the classic notebook or using a different startup command is still possible.
185185
You can achieve this by setting the environment variable `DOCKER_STACKS_JUPYTER_CMD` at container startup.
186186
The table below shows some options.
187+
Since `Jupyter Notebook v7` `jupyter-server` is used as a backend.
187188

188-
| `DOCKER_STACKS_JUPYTER_CMD` | Backend | Frontend |
189-
| --------------------------- | ---------------- | ---------------- |
190-
| `lab` (default) | Jupyter Server | JupyterLab |
191-
| `notebook` | Jupyter Notebook | Jupyter Notebook |
192-
| `nbclassic` | Jupyter Server | Jupyter Notebook |
193-
| `server` | Jupyter Server | None |
194-
| `retro`\* | Jupyter Server | RetroLab |
189+
| `DOCKER_STACKS_JUPYTER_CMD` | Frontend |
190+
| --------------------------- | ---------------- |
191+
| `lab` (default) | JupyterLab |
192+
| `notebook` | Jupyter Notebook |
193+
| `nbclassic` | NbClassic |
194+
| `server` | None |
195+
| `retro`\* | RetroLab |
195196

196197
Notes:
197198

198199
- \*Not installed at this time, but it could be the case in the future or in a community stack.
199-
- Any other valid `jupyter` command that starts the Jupyter server can be used.
200+
- Any other valid `jupyter` subcommand that starts the Jupyter Application can be used.
200201

201202
Example:
202203

203204
```bash
204-
# Run Jupyter Notebook on Jupyter Server
205+
# Run Jupyter Server with the Jupyter Notebook frontend
205206
docker run -it --rm \
206207
-p 8888:8888 \
207208
-e DOCKER_STACKS_JUPYTER_CMD=notebook \
208209
jupyter/base-notebook
209210
# Executing the command: jupyter notebook ...
210211

211-
# Run Jupyter Notebook classic
212+
# Use Jupyter NBClassic frontend
212213
docker run -it --rm \
213214
-p 8888:8888 \
214215
-e DOCKER_STACKS_JUPYTER_CMD=nbclassic \

docs/using/recipes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ docker run -it --rm \
145145

146146
Ref: <https://github.com/jupyter/docker-stacks/issues/999>
147147

148-
## Let's Encrypt a Notebook server
148+
## Let's Encrypt a Server
149149

150150
See the README for a basic automation here
151151
<https://github.com/jupyter/docker-stacks/tree/main/examples/make-deploy>
@@ -461,14 +461,14 @@ USER ${NB_UID}
461461

462462
Credit: [britishbadger](https://github.com/britishbadger) from [docker-stacks/issues/369](https://github.com/jupyter/docker-stacks/issues/369)
463463

464-
## Run Jupyter Notebook/Lab inside an already secured environment (i.e., with no token)
464+
## Run Server inside an already secured environment (i.e., with no token)
465465

466466
(Adapted from [issue 728](https://github.com/jupyter/docker-stacks/issues/728))
467467

468468
The default security is very good.
469469
There are use cases, encouraged by containers, where the jupyter container and the system it runs within lie inside the security boundary.
470470
It is convenient to launch the server without a password or token in these use cases.
471-
In this case, you should use the `start.sh` script to launch the server with no token:
471+
In this case, you should use the `start-notebook.sh` script to launch the server with no token:
472472

473473
For JupyterLab:
474474

docs/using/running.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ The following are some common patterns.
1616
**Example 1:**
1717

1818
This command pulls the `jupyter/scipy-notebook` image tagged `2023-07-25` from Docker Hub if it is not already present on the local host.
19-
It then starts a container running a Jupyter Notebook server and exposes the server on host port 8888.
20-
The server logs appear in the terminal and include a URL to the notebook server.
19+
It then starts a container running Jupyter Server with the JupyterLab frontend and exposes the server on host port 8888.
20+
The server logs appear in the terminal and include a URL to the server.
2121

2222
```bash
2323
docker run -it -p 8888:8888 jupyter/scipy-notebook:2023-07-25
@@ -33,7 +33,7 @@ docker run -it -p 8888:8888 jupyter/scipy-notebook:2023-07-25
3333
# or http://127.0.0.1:8888/lab?token=f31f2625f13d131f578fced0fc76b81d10f6c629e92c7099
3434
```
3535

36-
Pressing `Ctrl-C` twice shuts down the notebook server but leaves the container intact on disk for later restart or permanent deletion using commands like the following:
36+
Pressing `Ctrl-C` twice shuts down the Server but leaves the container intact on disk for later restart or permanent deletion using commands like the following:
3737

3838
```bash
3939
# list containers
@@ -54,14 +54,14 @@ docker rm 221331c047c4
5454
**Example 2:**
5555

5656
This command pulls the `jupyter/r-notebook` image tagged `2023-07-25` from Docker Hub if it is not already present on the local host.
57-
It then starts a container running a Jupyter Notebook server and exposes the server on host port 10000.
58-
The server logs appear in the terminal and include a URL to the notebook server, but with the internal container port (8888) instead of the correct host port (10000).
57+
It then starts a container running Server and exposes the server on host port 10000.
58+
The server logs appear in the terminal and include a URL to the Server, but with the internal container port (8888) instead of the correct host port (10000).
5959

6060
```bash
6161
docker run -it --rm -p 10000:8888 -v "${PWD}":/home/jovyan/work jupyter/r-notebook:2023-07-25
6262
```
6363

64-
Pressing `Ctrl-C` twice shuts down the notebook server and immediately destroys the Docker container.
64+
Pressing `Ctrl-C` twice shuts down the Server and immediately destroys the Docker container.
6565
New files and changes in `~/work` in the container will be preserved.
6666
Any other changes made in the container will be lost.
6767

@@ -78,7 +78,7 @@ where:
7878

7979
- `--detach`: will run the container in detached mode
8080

81-
You can also use the following docker commands to see the port and notebook server token:
81+
You can also use the following docker commands to see the port and Jupyter Server token:
8282

8383
```bash
8484
# get the random host port assigned to the container port 8888
@@ -131,8 +131,8 @@ subgidSize=$(( $(podman info --format "{{ range .Host.IDMappings.GIDMap }}+{{.Si
131131
```
132132

133133
This command pulls the `docker.io/jupyter/r-notebook` image tagged `2023-07-25` from Docker Hub if it is not already present on the local host.
134-
It then starts a container running a Jupyter Server and exposes the server on host port 10000.
135-
The server logs appear in the terminal and include a URL to the notebook server, but with the internal container port (8888) instead of the correct host port (10000).
134+
It then starts a container running a Jupyter Server with the JupyterLab frontend and exposes the server on host port 10000.
135+
The server logs appear in the terminal and include a URL to the server, but with the internal container port (8888) instead of the correct host port (10000).
136136

137137
```bash
138138
podman run -it --rm -p 10000:8888 \
@@ -156,7 +156,7 @@ The `podman run` option `--userns=auto` will, for instance, not be possible to u
156156
The example could be improved by investigating more in detail which UIDs and GIDs need to be available in the container and then only map them.
157157
```
158158

159-
Pressing `Ctrl-C` twice shuts down the notebook server and immediately destroys the Docker container.
159+
Pressing `Ctrl-C` twice shuts down the Server and immediately destroys the Docker container.
160160
New files and changes in `~/work` in the container will be preserved.
161161
Any other changes made in the container will be lost.
162162

0 commit comments

Comments
 (0)