Skip to content

Commit 2d9ab79

Browse files
authored
Merge branch 'main' into python3.13
2 parents d25a5e5 + 143db35 commit 2d9ab79

File tree

9 files changed

+31
-28
lines changed

9 files changed

+31
-28
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ repos:
4747
"requests",
4848
"urllib3",
4949
"types-beautifulsoup4",
50-
"types-PyYAML",
5150
"types-requests",
5251
"types-tabulate",
5352
"types-urllib3",
@@ -124,21 +123,21 @@ repos:
124123

125124
# Lint: Markdown
126125
- repo: https://github.com/igorshubovych/markdownlint-cli
127-
rev: v0.42.0
126+
rev: v0.43.0
128127
hooks:
129128
- id: markdownlint
130129
args: ["--fix"]
131130

132131
# Strip output from Jupyter notebooks
133132
- repo: https://github.com/kynan/nbstripout
134-
rev: 0.8.0
133+
rev: 0.8.1
135134
hooks:
136135
- id: nbstripout
137136

138137
# nbQA provides tools from the Python ecosystem like
139138
# pyupgrade, isort, black, and flake8, adjusted for notebooks.
140139
- repo: https://github.com/nbQA-dev/nbQA
141-
rev: 1.8.7
140+
rev: 1.9.1
142141
hooks:
143142
- id: nbqa-pyupgrade
144143
args: [--py39-plus]

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ Affected: all images.
99

1010
- **Breaking:** `docker-stacks-foundation`: switch to Python 3.13 ([#2163](https://github.com/jupyter/docker-stacks/pull/2163)).
1111

12+
## 2024-12-03
13+
14+
Affected: all images.
15+
16+
- **Breaking:** Switch to `mamba` v2 ([#2147](https://github.com/jupyter/docker-stacks/pull/2147)).
17+
More information about changes made: <https://mamba.readthedocs.io/en/latest/developer_zone/changes-2.0.html>.
18+
1219
## 2024-11-08
1320

1421
Affected: all images except `docker-stacks-foundation`.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ Older images are available on Docker Hub, but they will no longer be updated.
2929

3030
### Example 1
3131

32-
This command pulls the `jupyter/scipy-notebook` image tagged `2024-10-07` from Quay.io if it is not already present on the local host.
32+
This command pulls the `jupyter/scipy-notebook` image tagged `2024-11-19` from Quay.io if it is not already present on the local host.
3333
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:
3434

3535
```bash
36-
docker run -p 10000:8888 quay.io/jupyter/scipy-notebook:2024-10-07
36+
docker run -p 10000:8888 quay.io/jupyter/scipy-notebook:2024-11-19
3737
```
3838

3939
You can modify the port on which the container's port is exposed by [changing the value of the `-p` option](https://docs.docker.com/engine/containers/run/#exposed-ports) to `-p 8888:8888`.
@@ -48,11 +48,11 @@ The container remains intact for restart after the Server exits.
4848

4949
### Example 2
5050

51-
This command pulls the `jupyter/datascience-notebook` image tagged `2024-10-07` from Quay.io if it is not already present on the local host.
51+
This command pulls the `jupyter/datascience-notebook` image tagged `2024-11-19` from Quay.io if it is not already present on the local host.
5252
It then starts an _ephemeral_ container running a Jupyter Server with the JupyterLab frontend and exposes the server on host port 10000.
5353

5454
```bash
55-
docker run -it --rm -p 10000:8888 -v "${PWD}":/home/jovyan/work quay.io/jupyter/datascience-notebook:2024-10-07
55+
docker run -it --rm -p 10000:8888 -v "${PWD}":/home/jovyan/work quay.io/jupyter/datascience-notebook:2024-11-19
5656
```
5757

5858
The use of the `-v` flag in the command mounts the current working directory on the host (`${PWD}` in the example command) as `/home/jovyan/work` in the container.

binder/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# https://quay.io/repository/jupyter/base-notebook?tab=tags
55
ARG REGISTRY=quay.io
66
ARG OWNER=jupyter
7-
ARG BASE_IMAGE=$REGISTRY/$OWNER/base-notebook:2024-10-07
7+
ARG BASE_IMAGE=$REGISTRY/$OWNER/base-notebook:2024-11-19
88
FROM $BASE_IMAGE
99

1010
LABEL maintainer="Jupyter Project <[email protected]>"
@@ -13,7 +13,7 @@ LABEL maintainer="Jupyter Project <[email protected]>"
1313
# Fix: https://github.com/koalaman/shellcheck/wiki/SC3014
1414
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
1515

16-
ENV TAG="2024-10-07"
16+
ENV TAG="2024-11-19"
1717

1818
COPY --chown=${NB_UID}:${NB_GID} binder/README.ipynb "${HOME}"/README.ipynb
1919

docs/using/running.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ The following are some common patterns.
1515

1616
### Example 1
1717

18-
This command pulls the `jupyter/scipy-notebook` image tagged `2024-10-07` from Quay.io if it is not already present on the local host.
18+
This command pulls the `jupyter/scipy-notebook` image tagged `2024-11-19` from Quay.io if it is not already present on the local host.
1919
It then starts a container running Jupyter Server with the JupyterLab frontend and exposes the server on host port 8888.
2020
The server logs appear in the terminal and include a URL to the server.
2121

2222
```bash
23-
docker run -it -p 8888:8888 quay.io/jupyter/scipy-notebook:2024-10-07
23+
docker run -it -p 8888:8888 quay.io/jupyter/scipy-notebook:2024-11-19
2424

2525
# Entered start.sh with args: jupyter lab
2626

@@ -39,7 +39,7 @@ Pressing `Ctrl-C` twice shuts down the Server but leaves the container intact on
3939
# list containers
4040
docker ps --all
4141
# CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
42-
# eca4aa01751c quay.io/jupyter/scipy-notebook:2024-10-07 "tini -g -- start-no…" About a minute ago Exited (0) 5 seconds ago silly_panini
42+
# eca4aa01751c quay.io/jupyter/scipy-notebook:2024-11-19 "tini -g -- start-no…" About a minute ago Exited (0) 5 seconds ago silly_panini
4343

4444
# start the stopped container
4545
docker start --attach -i eca4aa01751c
@@ -53,12 +53,12 @@ docker rm eca4aa01751c
5353

5454
### Example 2
5555

56-
This command pulls the `jupyter/r-notebook` image tagged `2024-10-07` from Quay.io if it is not already present on the local host.
56+
This command pulls the `jupyter/r-notebook` image tagged `2024-11-19` from Quay.io if it is not already present on the local host.
5757
It then starts a container running Server and exposes the server on host port 10000.
5858
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
61-
docker run -it --rm -p 10000:8888 -v "${PWD}":/home/jovyan/work quay.io/jupyter/r-notebook:2024-10-07
61+
docker run -it --rm -p 10000:8888 -v "${PWD}":/home/jovyan/work quay.io/jupyter/r-notebook:2024-11-19
6262
```
6363

6464
Pressing `Ctrl-C` twice shuts down the Server and immediately destroys the Docker container.
@@ -138,7 +138,7 @@ subuidSize=$(( $(podman info --format "{{ range .Host.IDMappings.UIDMap }}+{{.Si
138138
subgidSize=$(( $(podman info --format "{{ range .Host.IDMappings.GIDMap }}+{{.Size }}{{end }}" ) - 1 ))
139139
```
140140

141-
This command pulls the `quay.io/jupyter/r-notebook` image tagged `2024-10-07` from Quay.io if it is not already present on the local host.
141+
This command pulls the `quay.io/jupyter/r-notebook` image tagged `2024-11-19` from Quay.io if it is not already present on the local host.
142142
It then starts a container running a Jupyter Server with the JupyterLab frontend and exposes the server on host port 10000.
143143
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).
144144

@@ -147,7 +147,7 @@ podman run -it --rm -p 10000:8888 \
147147
-v "${PWD}":/home/jovyan/work --user $uid:$gid \
148148
--uidmap $uid:0:1 --uidmap 0:1:$uid --uidmap $(($uid+1)):$(($uid+1)):$(($subuidSize-$uid)) \
149149
--gidmap $gid:0:1 --gidmap 0:1:$gid --gidmap $(($gid+1)):$(($gid+1)):$(($subgidSize-$gid)) \
150-
quay.io/jupyter/r-notebook:2024-10-07
150+
quay.io/jupyter/r-notebook:2024-11-19
151151
```
152152

153153
```{warning}

images/docker-stacks-foundation/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,8 @@ RUN set -x && \
124124
--prefix="${CONDA_DIR}" \
125125
--yes \
126126
'jupyter_core' \
127-
# excluding mamba 2.X due to several breaking changes
128-
# https://github.com/jupyter/docker-stacks/pull/2147
129-
'mamba<2.0.0' \
127+
'conda' \
128+
'mamba' \
130129
"${PYTHON_SPECIFIER}" && \
131130
rm -rf /tmp/bin/ && \
132131
# Pin major.minor version of python

requirements-dev.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ pytest-retry
66
# `pytest-xdist` is a plugin that provides the `--numprocesses` flag,
77
# allowing us to run `pytest` tests in parallel
88
pytest-xdist
9-
PyYAML
109
requests
1110
tabulate

tests/docker-stacks-foundation/test_packages.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,15 @@
7070
EXCLUDED_PACKAGES = [
7171
"bzip2",
7272
"ca-certificates",
73-
"conda-forge::blas[build=openblas]",
73+
"conda-forge::blas=*",
7474
"grpcio-status",
7575
"grpcio",
7676
"hdf5",
7777
"jupyterhub-singleuser",
7878
"jupyterlab-git",
79-
"mamba[version='<2.0.0']",
80-
"notebook[version='>",
79+
"mamba",
80+
"notebook>",
8181
"openssl",
82-
"pandas[version='>",
8382
"protobuf",
8483
"python",
8584
"r-irkernel",

tests/package_helper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2323
# SOFTWARE.
2424

25+
import json
2526
import logging
2627
import re
2728
from collections import defaultdict
2829
from itertools import chain
2930
from typing import Any, Optional
3031

31-
import yaml
3232
from docker.models.containers import Container
3333
from tabulate import tabulate
3434

@@ -61,7 +61,7 @@ def start_container(container: TrackedContainer) -> Container:
6161
@staticmethod
6262
def _conda_export_command(from_history: bool) -> list[str]:
6363
"""Return the mamba export command with or without history"""
64-
cmd = ["mamba", "env", "export", "--no-build"]
64+
cmd = ["mamba", "env", "export", "--no-build", "--json"]
6565
if from_history:
6666
cmd.append("--from-history")
6767
return cmd
@@ -96,7 +96,7 @@ def _execute_command(self, command: list[str]) -> str:
9696
@staticmethod
9797
def _parse_package_versions(env_export: str) -> dict[str, set[str]]:
9898
"""Extract packages and versions from the lines returned by the list of specifications"""
99-
dependencies = yaml.safe_load(env_export).get("dependencies")
99+
dependencies = json.loads(env_export).get("dependencies")
100100
# Filtering packages installed through pip
101101
# since we only manage packages installed through mamba here
102102
# They are represented by a dict with a key 'pip'

0 commit comments

Comments
 (0)