feat: add pinned CUDA manylinux image aliases#2901
Conversation
There was a problem hiding this comment.
Looking at the quay.io repos, those images seem to be using a moving tag. If I'm not mistaken, cibuildwheel will fail to use those images as soon as a new latest image is published.
It also might be nice to link to the GitHub repo https://github.com/gpu-ci-demo/manylinux-cuda-container in addition to the quay.io repo in the docs.
I was made aware of similar images a few weeks ago through an issue opened in https://github.com/pypa/manylinux: https://github.com/ameli/manylinux-cuda
|
🤖 AI text below 🤖 The manylinux_cuda repositories now publish dated tags (e.g. I also added a link to the source project (
|
The manylinux_cuda project publishes manylinux containers bundling the CUDA Toolkit (documented in pypa#2896). Add pinned aliases for them so users can pass a short name (e.g. manylinux_2_28_cuda13_1) to the manylinux-*-image options, just like the existing manylinux_2_28 alias, instead of a full registry URL. These images are only published with a 'latest' tag, and each architecture has its own repository, so (unlike the PyPA images) they are pinned by digest. bin/update_docker.py learns to resolve and pin these, keeping them up to date via `nox -s update_pins`. Aliases are added for x86_64 and aarch64 (the only arches these images exist for): manylinux_{2_28,2_34}_cuda{12_9,13_1}. Assisted-by: ClaudeCode:claude-opus-4.8 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The manylinux_cuda repositories now publish dated tags (e.g. 2026.06.08-1) alongside 'latest', so pin to those just like the PyPA images instead of by digest. Also link the source project (gpu-ci-demo/manylinux-cuda-container) from the CudaImage docstring and the CUDA docs. Assisted-by: ClaudeCode:claude-opus-4.8
45dd24a to
0ed5106
Compare
|
A few questions-
|
|
For the first point, yes, simpler config and pinned versions based on the cibuildwheel version. Second point, no idea - @hcho3 maybe can comment. There is a lot of support in general going forward for expanding CUDA in wheels with variants. I'd not want to go too far here until we see the final form of variants and if they are getting accepted. I think I have a plan for them. I think this is fine as far as that's concerned, though (any variant support shouldn't interfere with image aliases). I'm perfectly fine waiting and seeing if these get used first, etc. |
|
Hmm. Yes the variant work also intersects here. That might end up as some matrix axes that cibuildwheel operates with. We already referenced these images in the documentation, right? Yes, I see them in the FAQ. I think I'd rather wait and see how usage looks like. And if we were adding shorthand pins for these images, I'd like to include some kind of integration test to reduce the chances that we pin a bad/incompatible version |
Yes, my employer (NVIDIA) is interested in making it easy for developers to build CUDA wheels. My org is planning to support
What would be the metrics here? Open source projects using |
|
On a second thought, it would be better for everyone if we waited a little before merging the image aliases. Let's try to gain adoption in the wild (multiple open-source projects). This is because the image aliases involve pinning image versions, and we should wait until the images are battle tested in the wild. |
Updated the docs naming issue in #2900 separately.
I left the minor versions in, but an alternative would be to drop them, and always track the latest minor version (
manylinux_2_28_cuda13instead ofmanylinux_2_28_cuda13_1).🤖 AI text below 🤖
Summary
Follow-up to #2896, which documented building CUDA wheels using the
manylinux_cudacontainers. This adds pinned aliases for those images so users can pass a short name to themanylinux-*-imageoptions, exactly like the existingmanylinux_2_28alias, instead of a full registry URL:New aliases (for
x86_64andaarch64only — the only arches these images exist for):manylinux_2_28_cuda12_9,manylinux_2_28_cuda13_1manylinux_2_34_cuda12_9,manylinux_2_34_cuda13_1No
options.pychanges were needed — alias resolution is entirely cfg-driven (pinned_images.get(value, value)).Details
bin/update_docker.py— adds aCudaImageclass and a digest-pinning branch. Unlike the PyPA images (which carry dated tags), the CUDA repos publish only alatesttag and each arch is a separate repository, so they are pinned by digest (@sha256:…) per architecture.nox -s update_pinsnow keeps these current.cibuildwheel/resources/pinned_docker_images.cfg— adds the 8 CUDA entries (4 aliases × 2 arches), pinned to current digests. Generated by the updated script; the existing PyPA pins were left untouched so this PR doesn't sweep in unrelated pin-date bumps.docs/faq.md— documents the new aliases (the recommended, pinned approach) while still showing the underlyingquay.io/manylinux_cuda/…repo path so users can pin other combinations or use:latestdirectly.unit_test/options_test.py— parametrized test asserting each CUDA alias resolves to a digest-pinnedmanylinux_cudaimage on supported arches and is absent on others.Note
The image names in #2896's docs (
manylinux2_28_…) didn't match the actual public quay repos, which are namedmanylinux_2_28_…(underscore, matching the PyPA convention). I confirmed the correct names against the live registry and the docs are corrected here.No CUDA build/integration test is included — that's a larger task for another time.
Verification
prek -aclean (ruff + mypy)pytest unit_test/options_test.py— existing + 8 new tests pass