Serial seasoned PyCon speaker since 2015... ◦ • Leading development of the Backend.AI core platform & fractional GPU virtualization technology Talks in KR, APAC(KR, JP, SG), US, JP, TH Contributor in aio-libs, maintaining aiodocker & aiomonitor ◦ Also wrote aiotools & Callosum • Ph.D. in Computer Science, KAIST (High-perf packet processing framework for heterogeneous accelerators) • https://speakerdeck.com/achimnol • https://github.com/achimnol
Variants (follow-up to my talk in PyCon KR 2025) ◦ Why can’t we just do “pip install torch”? ◦ Extending the wheel platform tags with vendor-provided variants ◦ The updates since last year • This talk: Could we bring the same idea to the container world? • Experiments & Applications ◦ Docker variant plugin ◦ Backend.AI platform integration
install torch"? ✓ Platform tags can only handle OS type & CPU architectures and glibc versions (manylinux). ✓ There are multiple (increasing #) accelerator vendors, and each one may have its own exotic compatibility tables and rules.
changes during 2025 → 2026 Topic 2025 (WheelNext proposal) 2026 (PEP 817 & PEP 825) Variant ID format Hash-based variant index Human-readable slug Security model Automatic loading & execution of variant providers Explicit opt-in with vendoring well-known providers Property model 3-tuple namespace :: feature :: value all-or-nothing (conjunctive) matching Same 3-tuple, extended with the multi-value property semantic that allows one-of-them matching, Range matching with commonly defined _lower_bound or _upper_bound suffixes “null” variant Zero number of properties are represented as the “00000000” variant. Same, represented as “null”, with an explicitly higher precedence than bare (non-variant) wheels Variant-specific dependencies (None) e.g., dep1; "nvidia" in variant_namespace in requirements with pylock.toml integration ABI support (None) Introduce a reserved namespace: abi_dependency (e.g., “abi_dependency :: torch :: 2.9”)
“stakeholders” ◦ Maintainers and developers of: ▪ ▪ • Package tooling such as setuptools, pip, conda, poetry, uv Difficult-to-distribute libraries such as numpy, torch, xgboost ◦ Downstream package maintainers from Linux distros ◦ All users who are interested in the topic Format: A half-day workshop ◦ 3~4 Selected topic talks followed by Lightning Talks and round-table discussions @pradyunsg (Pradyun Gedam) @jezdez (Jannis Leidel) @cam-gerlach (C.A.M. Gerlach)
Better Compression (Emma Smith) ◦ https://docs.google.com/presentation/d/1zh-3FkCg2cSMp3QD5oFji5sebeJlu3Hg_d-maYe7Pno/edi t?usp=sharing ◦ How to not break existing CI/CD pipelines after changing the wheel format? ◦ ▪ Minimal change via PEP 777 → sub-PEP per individual change ▪ Backward compatibility in wheel formats while index providers decide the transition timing. Adoption of Zstandard ▪ Expected savings: 25% size reduction of top 1000 projects, 100PB traffic, 36-years of decompression latencies ▪ Challenge: toolings like pip don’t like adding C extensions. • ▪ ◦ But, Python 3.14 included zstd as a stdlib. Proposal: Store tar.zst uncompressed inside ZIP for backward compatibility QnA ▪ Whether to allow other compression formats like xz? ▪ Uncompressed metadata for tools like uv? ▪ Conda’s “zip streaming writes” idea?
variants in OCI (Open Container Image) ◦ Borrows Golang's build target variant expressions ◦ Several discussions related to expand variant specs (opencontainers/image-spec#1216) ☹ No consideration for accelerators Source: https://specs.opencontainers.org/image-spec/image-index/#platform-variants
many other systems, Backend.AI has adopted a custom tagging ruleset. ◦ pytorch:2.12.0-ubuntu24.04-py312 ◦ pytorch:2.12.0-ubuntu24.04-cuda13-py312 ◦ pytorch:2.12.0-ubuntu22.04-atom-py313 ◦ pytorch:2.12.0-ubuntu22.04-... ☹ Manual client-side selection (exact, partial, ...?) ☹ No standardized tag namings across different vendors ☹ Too long tags for multi-feature-compatible images
• Prioritized List [stable in v1.35] & DRAListTypeAttributes [alpha in v1.36] ◦ Consumed by CEL expressions to generalize matching conditions ◦ Specifies alternative combinations of device properties. ◦ Updated DRAListTypeAttributes introduces typed values (bools, ints, strings, versions). ☹ Looks promising, but complexity still left to users (Manual CEL expression writing...) Source: https://kubernetes.io/docs/concepts/scheduling-eviction/dynamic-resource-allocation/
Dockerfile You may parametrize labels and build steps using ARG directives. ... LABEL dev.pep817.variant-label="cu128" \ dev.pep817.variant.nvidia.cuda_version_lower_bound="12.8" ... Namespace Feature Value $ docker build -t registry.internal/myapp:1.0.0-cu128 . $ docker variant push registry.internal/myapp:1.0.0-cu128 • Using the variant image For local testing, use the proxy’s host:port when referring to the images. $ docker variant pull registry.internal/myapp:1.0.0 Selected variant "cu128" of registry.internal/myapp version 1.0.0 ... Tagged registry.internal/myapp:1.0.0 and registry.internal/myapp:1.0.0-cu128 ...
a given workload ◦ ◦ Different GPU generations come with different compute capability and SM architectures. Workload compatibility comes from the CUDA runtime version in container images. • Need to support multi-node jobs (aka gang scheduling) ◦ A single resource slot “cuda.device” or “cuda.shares” cannot distinguish various device-specific & workload-specific variants. ◦ All sub-containers within a workload should have identical/compatible hardware combinations across multiple nodes.
multi-vendor accelerator variants ◦ The specification is being actively updated and discussed. ◦ 2026 version includes more practical extensions like variant-specific dependencies. Docker Variant Plugin ◦ • • A simple extension to the existing container ecosystem (CLI plugin, registry proxy) Backend.AI ◦ Agent-Device registry table ◦ Reusing the variant data models Future Work ◦ Build and distribute variant-aware container images (Q: could we automate labeling?) ◦ We are looking for provider participation from AI chip vendors!