Skip to content

Commit 888b1b5

Browse files
committed
Merge branch 'main' into python3.13
2 parents 1e4bcfb + 1bbab5c commit 888b1b5

File tree

83 files changed

+287
-203
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+287
-203
lines changed

.github/workflows/docker-build-test-upload.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ jobs:
101101
--variant ${{ inputs.variant }}
102102
--hist-lines-dir /tmp/jupyter/hist_lines/
103103
--manifests-dir /tmp/jupyter/manifests/
104+
--repository ${{ github.repository }}
104105
shell: bash
105106
- name: Upload manifest file 💾
106107
uses: actions/upload-artifact@v4

.github/workflows/docker-wiki-update.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@ jobs:
5353
uses: stefanzweifel/git-auto-commit-action@e348103e9026cc0eee72ae06630dbe30c8bf7a79 # v5.1.0
5454
with:
5555
commit_message: "Automated wiki publish for ${{ github.sha }}"
56-
repository: wiki/
56+
repository: wiki_src/

.github/workflows/docker.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,10 @@ jobs:
436436
x86_64-r,
437437
x86_64-julia,
438438
x86_64-tensorflow,
439+
x86_64-tensorflow-cuda,
439440
x86_64-pytorch,
441+
x86_64-pytorch-cuda11,
442+
x86_64-pytorch-cuda12,
440443
x86_64-datascience,
441444
x86_64-pyspark,
442445
x86_64-all-spark,

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ Affected: all images.
1313

1414
Affected: all images.
1515

16-
- **Non-breaking:**: Better tagging directory structure ([#2228](https://github.com/jupyter/docker-stacks/pull/2228)).
16+
- **Non-breaking:** Better tagging directory structure ([#2228](https://github.com/jupyter/docker-stacks/pull/2228)).
17+
- **Non-breaking:** Better testing directory structure ([#2231](https://github.com/jupyter/docker-stacks/pull/2231)).
1718

1819
## 2025-02-18
1920

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ linkcheck-docs: ## check broken links
7777

7878

7979
hook/%: VARIANT?=default
80+
hook/%: REPOSITORY?=$(OWNER)/docker-stacks
8081
hook/%: ## run post-build hooks for an image
8182
python3 -m tagging.apps.write_tags_file \
8283
--registry "$(REGISTRY)" \
@@ -90,7 +91,8 @@ hook/%: ## run post-build hooks for an image
9091
--short-image-name "$(notdir $@)" \
9192
--variant "$(VARIANT)" \
9293
--hist-lines-dir /tmp/jupyter/hist_lines/ \
93-
--manifests-dir /tmp/jupyter/manifests/
94+
--manifests-dir /tmp/jupyter/manifests/ \
95+
--repository "$(REPOSITORY)"
9496
python3 -m tagging.apps.apply_tags \
9597
--registry "$(REGISTRY)" \
9698
--owner "$(OWNER)" \

docs/maintaining/tagging.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ For example, we dump all `conda` packages with their versions into the manifest.
2828

2929
```{literalinclude} tagging_examples/docker_runner.py
3030
:language: py
31+
:lines: 3-
3132
```
3233

3334
### GitHelper
@@ -36,6 +37,7 @@ For example, we dump all `conda` packages with their versions into the manifest.
3637

3738
```{literalinclude} tagging_examples/git_helper.py
3839
:language: py
40+
:lines: 3-
3941
```
4042

4143
The prefix of commit hash (namely, 12 letters) is used as an image tag to make it easy to inherit from a fixed version of a docker image.
@@ -50,6 +52,7 @@ All the taggers are inherited from `TaggerInterface`:
5052

5153
```{literalinclude} ../../tagging/taggers/tagger_interface.py
5254
:language: py
55+
:start-at: class TaggerInterface
5356
```
5457

5558
So, the `tag_value(container)` method gets a docker container as an input and returns a tag.
@@ -58,6 +61,7 @@ So, the `tag_value(container)` method gets a docker container as an input and re
5861

5962
```{literalinclude} ../../tagging/taggers/sha.py
6063
:language: py
64+
:start-at: class SHATagger
6165
```
6266

6367
- `taggers/` subdirectory contains all the taggers.
@@ -72,6 +76,7 @@ All the other manifest classes are inherited from `ManifestInterface`:
7276

7377
```{literalinclude} ../../tagging/manifests/manifest_interface.py
7478
:language: py
79+
:start-at: class ManifestInterface
7580
```
7681

7782
- The `markdown_piece(container)` method returns a piece of markdown file to be used as a part of the build manifest.
@@ -80,14 +85,15 @@ All the other manifest classes are inherited from `ManifestInterface`:
8085

8186
```{literalinclude} ../../tagging/manifests/apt_packages.py
8287
:language: py
88+
:start-at: class AptPackagesManifest
8389
```
8490

8591
- `quoted_output(container, cmd)` simply runs the command inside a container using `DockerRunner.run_simple_command` and wraps it to triple quotes to create a valid markdown piece.
8692
It also adds the command which was run to the markdown piece.
8793
- `manifests/` subdirectory contains all the manifests.
8894
- `apps/write_manifest.py` is a Python executable to create the build manifest and history line for an image.
8995

90-
### Images Hierarchy
96+
## Images Hierarchy
9197

9298
All images' dependencies on each other and what taggers and manifest are applicable to them are defined in `hierarchy/images_hierarchy.py`.
9399

docs/maintaining/tagging_examples/docker_runner.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Copyright (c) Jupyter Development Team.
2+
# Distributed under the terms of the Modified BSD License.
13
from tagging.utils.docker_runner import DockerRunner
24

35
with DockerRunner("ubuntu") as container:

docs/maintaining/tagging_examples/git_helper.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Copyright (c) Jupyter Development Team.
2+
# Distributed under the terms of the Modified BSD License.
13
from tagging.utils.git_helper import GitHelper
24

35
print("Git hash:", GitHelper.commit_hash())

tagging/apps/apply_tags.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,16 @@ def apply_tags(
4242
if __name__ == "__main__":
4343
logging.basicConfig(level=logging.INFO)
4444

45-
arg_parser = common_arguments_parser()
45+
arg_parser = common_arguments_parser(
46+
registry=True, owner=True, short_image_name=True, variant=True, tags_dir=True
47+
)
4648
arg_parser.add_argument(
4749
"--platform",
4850
required=True,
4951
type=str,
5052
choices=["x86_64", "aarch64", "arm64"],
5153
help="Image platform",
5254
)
53-
arg_parser.add_argument(
54-
"--tags-dir",
55-
required=True,
56-
type=Path,
57-
help="Directory with saved tags file",
58-
)
5955
args = arg_parser.parse_args()
6056
args.platform = unify_aarch64(args.platform)
6157

tagging/apps/common_cli_arguments.py

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1+
# Copyright (c) Jupyter Development Team.
2+
# Distributed under the terms of the Modified BSD License.
13
import argparse
4+
from pathlib import Path
25

36

47
def common_arguments_parser(
5-
registry: bool = True,
6-
owner: bool = True,
7-
short_image_name: bool = True,
8-
variant: bool = True,
8+
*,
9+
registry: bool = False,
10+
owner: bool = False,
11+
short_image_name: bool = False,
12+
variant: bool = False,
13+
tags_dir: bool = False,
14+
hist_lines_dir: bool = False,
15+
manifests_dir: bool = False,
916
) -> argparse.ArgumentParser:
1017
"""Add common CLI arguments to parser"""
1118

@@ -35,5 +42,26 @@ def common_arguments_parser(
3542
required=True,
3643
help="Variant tag prefix",
3744
)
45+
if tags_dir:
46+
parser.add_argument(
47+
"--tags-dir",
48+
required=True,
49+
type=Path,
50+
help="Directory for tags file",
51+
)
52+
if hist_lines_dir:
53+
parser.add_argument(
54+
"--hist-lines-dir",
55+
required=True,
56+
type=Path,
57+
help="Directory for hist_lines file",
58+
)
59+
if manifests_dir:
60+
parser.add_argument(
61+
"--manifests-dir",
62+
required=True,
63+
type=Path,
64+
help="Directory for manifests file",
65+
)
3866

3967
return parser

0 commit comments

Comments
 (0)