Skip to content

Commit caf7252

Browse files
base-notebook: stop installing nodejs from conda-forge (#2172)
* base-notebook: stop installing nodejs from conda-forge nodejs was a conda dependency of jupyterhub, but by installing jupyterhub-base we no longer need it and could opt to remove it. By doing this, building base-notebook led to a reported size reduction from 974MB to 828MB, which is a 146MB / 15% size reduction. * Update CHANGELOG.md * Update CHANGELOG.md * Install jupyterhub-singleuser instead of jupyterhub-base Note that jupyterhub-base is really whats the foundational need for this image, where jupyterhub-singleuser the conda-forge package is building on jupyterhub-base by also adding a depdendency on jupyterlab - but the jupyterhub-singleuser command is provided by jupyterhub-base conda-forge package. * Update CHANGELOG.md Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com> --------- Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>
1 parent 2c7e64a commit caf7252

File tree

6 files changed

+12
-23
lines changed

6 files changed

+12
-23
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
This changelog only contains breaking and/or significant changes manually introduced to this repository (using Pull Requests).
44
All image manifests can be found in [the wiki](https://github.com/jupyter/docker-stacks/wiki).
55

6+
## 2024-11-08
7+
8+
Affected: all images except `docker-stacks-foundation`.
9+
10+
- **Breaking:** `base-notebook`: stop installing `nodejs` from `conda-forge` ([#2172](https://github.com/jupyter/docker-stacks/pull/2172)).
11+
12+
Reason: It isn't a direct dependency on anything in the images any more, and increased the image size with ~150MB.
13+
614
## 2024-11-06
715

816
Affected: all images except `docker-stacks-foundation`.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM quay.io/jupyter/base-notebook
22

3-
RUN mamba install --yes 'jupyterhub-base==4.0.1' && \
3+
RUN mamba install --yes 'jupyterhub-singleuser==4.0.1' && \
44
mamba clean --all -f -y && \
55
fix-permissions "${CONDA_DIR}" && \
66
fix-permissions "/home/${NB_USER}"

docs/using/selecting.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ It contains:
5454

5555
- Everything in `jupyter/docker-stacks-foundation`
5656
- Minimally functional Server (e.g., no LaTeX support for saving notebooks as PDFs)
57-
- `notebook`, `jupyterhub-base`, and `jupyterlab` packages
58-
Note: we're also installing `nodejs` as it has historically been installed indirectly as a dependency of `jupyterhub` package, which was used before.
59-
See more at: <https://github.com/jupyter/docker-stacks/pull/2171>
57+
- `notebook`, `jupyterhub-singleuser`, and `jupyterlab` packages
6058
- A `start-notebook.py` script as the default command
6159
- A `start-singleuser.py` script useful for launching containers in JupyterHub
6260
- Options for a self-signed HTTPS certificate

images/base-notebook/Dockerfile

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,16 @@ USER ${NB_UID}
3939
# files across image layers when the permissions change
4040
WORKDIR /tmp
4141
RUN mamba install --yes \
42-
'jupyterhub-base' \
42+
'jupyterhub-singleuser' \
4343
'jupyterlab' \
4444
'nbclassic' \
45-
# nodejs has historically been installed indirectly as a dependency.
46-
# When it was no longer getting installed indirectly,
47-
# we started installing it explicitly to avoid introducing a breaking change
48-
# for users building on top of these images.
49-
# See: https://github.com/jupyter/docker-stacks/pull/2171
50-
'nodejs' \
5145
# Sometimes, when the new version of `jupyterlab` is released, latest `notebook` might not support it for some time
5246
# Old versions of `notebook` (<v7) didn't have a restriction on the `jupyterlab` version, and old `notebook` is getting installed
5347
# That's why we have to pin the minimum notebook version
5448
# More info: https://github.com/jupyter/docker-stacks/pull/2167
5549
'notebook>=7.2.2' && \
5650
jupyter server --generate-config && \
5751
mamba clean --all -f -y && \
58-
npm cache clean --force && \
5952
jupyter lab clean && \
6053
rm -rf "/home/${NB_USER}/.cache/yarn" && \
6154
fix-permissions "${CONDA_DIR}" && \

tests/base-notebook/test_npm_package_manager.py

Lines changed: 0 additions & 9 deletions
This file was deleted.

tests/docker-stacks-foundation/test_packages.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,9 @@
7474
"grpcio-status",
7575
"grpcio",
7676
"hdf5",
77-
"jupyterhub-base",
77+
"jupyterhub-singleuser",
7878
"jupyterlab-git",
7979
"mamba[version='<2.0.0']",
80-
"nodejs",
8180
"notebook[version='>",
8281
"openssl",
8382
"pandas[version='>",

0 commit comments

Comments
 (0)