mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-16 22:42: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:
25
tagging/get_prefix.py
Normal file
25
tagging/get_prefix.py
Normal file
@@ -0,0 +1,25 @@
|
||||
# Copyright (c) Jupyter Development Team.
|
||||
# Distributed under the terms of the Modified BSD License.
|
||||
from tagging.get_platform import get_platform
|
||||
|
||||
DEFAULT_VARIANT = "default"
|
||||
|
||||
|
||||
def get_file_prefix_for_platform(platform: str, variant: str) -> str:
|
||||
return f"{platform}-{variant}"
|
||||
|
||||
|
||||
def get_tag_prefix_for_platform(platform: str, variant: str) -> str:
|
||||
if variant == DEFAULT_VARIANT:
|
||||
return platform
|
||||
return f"{platform}-{variant}"
|
||||
|
||||
|
||||
def get_file_prefix(variant: str) -> str:
|
||||
platform = get_platform()
|
||||
return get_file_prefix_for_platform(platform, variant)
|
||||
|
||||
|
||||
def get_tag_prefix(variant: str) -> str:
|
||||
platform = get_platform()
|
||||
return get_tag_prefix_for_platform(platform, variant)
|
Reference in New Issue
Block a user