mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-15 05:52:57 +00:00
Add pytorch-notebook image variants with cuda 11 and 12 (x86_64 versions only) (#2091)
* feat: build cuda variants of pytorch * feat: build with variant tag * style: remove unused import * refactor: rename get_prefix params (cherry picked from commit 12b50af258c2f331d4100fb63fd41ad1a30acb1d) * revert: drop ROOT_CONTAINER addition from Makefile (cherry picked from commit f42314513df2855957a05c6ba0c748d2df26d7b0) * style: use consistent three empty lines in Makefile (cherry picked from commit 446b45aab37a37720462b5df305ce96b139cf67a) * refactor: add default value for parent-image (cherry picked from commit 32955cec99c7202f0ce50647dfc61ec98f57f741) * revert: use original workflow structure (cherry picked from commit 68c6744513636ec93d14f9bd0bbd123907efd13b) * refactor: use single build image step (cherry picked from commit 5f1ac0aeedcb5969a6d4b2a5bc939817378ab55d) * fix: run merge tags regardless of repository owner (cherry picked from commit 3fce366a98adc5db0d127f28ddf3157d13297a0f) * refactor: build cuda12 instead of cuda tag (cherry picked from commit 217144ecd322356376f04efb92792a20b4380177) * docs: add note about CUDA tags to documentation * refactor: add default value for variant in build-test-upload * refactor: swap ordering of cuda11/cuda12 variants * refactor: remove optional str type in arg parser * fix: add proper env variables to CUDA Dockerfiles * fix: remove CUDA build for aarch64 * fix: use latest NVIDIA documentation link * fix: skip aarch64 tags file for CUDA variants --------- Co-authored-by: zynaa <7562909-zynaa@users.noreply.gitlab.com>
This commit is contained in:
@@ -9,7 +9,7 @@ from pathlib import Path
|
||||
from docker.models.containers import Container
|
||||
|
||||
from tagging.docker_runner import DockerRunner
|
||||
from tagging.get_platform import get_platform
|
||||
from tagging.get_prefix import get_file_prefix, get_tag_prefix
|
||||
from tagging.get_taggers_and_manifests import get_taggers_and_manifests
|
||||
from tagging.git_helper import GitHelper
|
||||
from tagging.manifests import ManifestHeader, ManifestInterface
|
||||
@@ -73,6 +73,7 @@ def write_manifest(
|
||||
short_image_name: str,
|
||||
registry: str,
|
||||
owner: str,
|
||||
variant: str,
|
||||
hist_lines_dir: Path,
|
||||
manifests_dir: Path,
|
||||
) -> None:
|
||||
@@ -81,12 +82,12 @@ def write_manifest(
|
||||
|
||||
image = f"{registry}/{owner}/{short_image_name}:latest"
|
||||
|
||||
file_prefix = get_platform()
|
||||
file_prefix = get_file_prefix(variant)
|
||||
commit_hash_tag = GitHelper.commit_hash_tag()
|
||||
filename = f"{file_prefix}-{short_image_name}-{commit_hash_tag}"
|
||||
|
||||
with DockerRunner(image) as container:
|
||||
tags_prefix = get_platform()
|
||||
tags_prefix = get_tag_prefix(variant)
|
||||
all_tags = [
|
||||
tags_prefix + "-" + tagger.tag_value(container) for tagger in taggers
|
||||
]
|
||||
@@ -137,6 +138,11 @@ if __name__ == "__main__":
|
||||
required=True,
|
||||
help="Owner of the image",
|
||||
)
|
||||
arg_parser.add_argument(
|
||||
"--variant",
|
||||
required=True,
|
||||
help="Variant tag prefix",
|
||||
)
|
||||
args = arg_parser.parse_args()
|
||||
|
||||
LOGGER.info(f"Current build timestamp: {BUILD_TIMESTAMP}")
|
||||
@@ -145,6 +151,7 @@ if __name__ == "__main__":
|
||||
args.short_image_name,
|
||||
args.registry,
|
||||
args.owner,
|
||||
args.variant,
|
||||
args.hist_lines_dir,
|
||||
args.manifests_dir,
|
||||
)
|
||||
|
Reference in New Issue
Block a user