feat: TEM-110 pytorch 2.12.0/2.12.1/2.13.0 - #162
Conversation
|
Reviewed the latest changes. I don’t see a blocking code issue, and the current PyTorch and cluster build/test jobs passed across all three CUDA groups. Looks good from my side. One thing to coordinate with #161: both PRs change the GPU exclusion list in |
|
Since this PR is adding torch 2.12.0/2.12.1/2.13.0, would it make sense to also add a CUDA 13.2.1 entry here? Concretely:
Happy to help wire this up if useful — just flagging since it lines up closely with what's already in flight here. |
Summary
Adds PyTorch 2.12.0, 2.12.1 and 2.13.0 to the
runpod/pytorchandrunpod/pytorch:*-clustermatrices, replaces the single-package Pillow patch with arequirements.txtof CVE pins, upgrades Grafana and Prometheus in the cluster layer, and widens the GPU pool the PyTorch smoke test may draw from.runpod/pytorchimagesrunpod/pytorch:*-clusterimagesPyTorch 2.12 / 2.13
New
TORCH_METAentries with torchvision 0.27.0 / 0.27.1 / 0.28.0 and torchaudio pinned to 2.11.0 for all three: 2.11.0 is torchaudio's last release — it was dropped from the PyTorch release process in 2.12, decode/encode moved to TorchCodec. Upstream states it is compatible with later torch versions, and its wheel declares no dependencies, so it cannot downgrade torch. That pairing is the main risk in this PR and it is measured below, on torch 2.12.1 and 2.13.0.Wheel sources differ from the CUDA base on purpose:
.0, so2.12.0+cu129wheels do not exist; 2.12.1 covers the 12.x bases instead.The cluster matrix stays a curated subset: 2.12.1 and 2.13.0 on every base, plus 2.12.0 on cuda 13.0.0.
torchcodec
From torchaudio 2.9 on,
torchaudio.loadandsaveare thin wrappers around the separate torchcodec package and raiseImportError: TorchCodec is requiredwithout it. That was never installed, so audio I/O is already broken in the released 2.9.0 and 2.9.1 images — this PR fixes it rather than introducing it.torchcodec also replaces
torchaudio.io(StreamReader/StreamWriter), the old NVDEC video path, which was deprecated in 2.8 and removed in 2.9 — so shipping the CUDA build keeps the 2.9+ images at parity with 2.6–2.8 on hardware video decoding.torchaudio.iotorchcodec gets its own install step and its own wheel source, because its CUDA builds do not track torch's index cadence: the cu129 index has no torchcodec for torch 2.9 at all — it jumps from 0.7.0 to 0.10.0 — so the two 2.9.x rows on the cuda 12.9.0 base carry
codec_src = "128". Same CUDA major, so the runtime sonames match. Everything else defaults to torch's ownwhl_src. Installed with--no-deps, so it can never pull a different torch; the arg is empty for 2.6–2.8.Measured on pods, not inferred:
load/saveImportError(3, 240, 320)cuda:0(3, 240, 320)cuda:0(3, 240, 320)cuda:0(3, 240, 320)cuda:0Rows two and three are the
codec_src = "128"override — the pairings where torchcodec's CUDA build does not match torch's. GPU decoding lands oncuda:0in all three, and the base image's ffmpeg carries all ten*_cuviddecoders, so the NVDEC claim in the README is measured rather than assumed. A PyPI CPU wheel of 0.9.1 was also measured working next to torch 2.9.0+cu129, and stays the fallback if acodec_srcpairing ever fails to load.Both torchcodec pins and both wheel sources (cu128/cu129 and cu130) are covered.
Also fixed: torchvision missing on 2.9.1
TORCH_METAhad"2.9.1" = {}— no torchvision at all, thoughtorchvision 0.24.1exists on cu128, cu129 and cu130. So the releasedtorch291images ship without torchvision, and without numpy, which nothing else in the repo installs:import torchwarnsFailed to initialize NumPyandtensor.numpy()does not work. Pinned to 0.24.1, which brings numpy with it. Pre-existing in 1.1.0, found by running the audio checks above; verified on a rebuilt pod, where the same image reportstorchvision 0.24.1+cu129andnumpy 2.5.2and the warning is gone.The 2.12.1 and 2.13.0 runs also confirm the thing torchaudio 2.11.0 with torch 2.12/2.13 actually risks: its compiled
libtorchaudiolinks against libtorch, and the wheel declares no dependencies, so pip would install it regardless of ABI.import torchaudioloads the library, checks its compiled CUDA version againsttorch.version.cudaand calls an op through torch's registry — all three passed, and Spectrogram/MelSpectrogram/Resample produce correct values on the GPU.Vulnerability pins
The
PILLOW_VERSIONbuild arg is replaced byofficial-templates/pytorch/requirements.txt, mounted through a named build context, so new pins no longer need a bake variable each:torch 2.12.x caps setuptools at
<82, and 81.0.0 is the highest release under that cap whose vendoredsetuptools/_vendor/copies of jaraco.context and wheel clear CVE-2026-23949 / CVE-2026-24049. Grype catalogs those vendored dist-info dirs, so the top-level pins alone do not clear the findings.COPY --from=requirementsreferences a build context rather than aFROMalias, which hadolint flags as DL3022 — added to the ignore list in both hadolint workflows.Monitoring stack: Grafana 13.1.5, Prometheus 3.14.0
Both were flagged by Grype in the cluster image.
kin-openapiand findings inetcd,cel-go,otel,klauspost/compress,grpc,x/crypto,x/netandx/text.x/text0.40.0 (CVE-2026-56852, High),grpc1.82.1 (GHSA-hrxh-6v49-42gf, High) and a newer Go toolchain.Neither is a breaking change for this image. Grafana is a patch bump inside 13.1.x; its three behaviour-affecting security fixes touch alert-rule authorization, SQL-datasource macro parsing and the auth-proxy cache key, and this image provisions no alert rules and only a Prometheus datasource. Prometheus 3.14.0 lists five
CHANGEentries — the deprecatedstatsquery parameter (warning only), emptyseparator/replacementin/api/v1/status/config, a dropped Hetzner label, duration expressions on by default, andfirst_over_timepromoted to stable. The generated scrape config uses onlyscrape_interval,evaluation_intervalandstatic_configs; the dashboards use no range selector other than[5m]; the supervisor program passes no feature flags. TSDB data is pod-local, so storage compatibility does not apply.CI cache key
The cluster sticky-disk key gains a
-v2suffix. The previous snapshot held a partial blob from an interrupted base-image pull, and every following run failed on it withfailed commit on ref "layer-sha256:…": unexpected commit digest … failed preconditionwhile computing a cache key — so a re-run could not clear it. Only the/prlineage was affected; the release lineage onmainwas clean.Compatibility, measured
53 pods on RunPod, 2026-09-01, across sm_80 … sm_120 in both cloud tiers, on
1.2.0-rc.162. Every row is a real pod: created, booted, SSH-verified, thentorch.cuda.is_available()plus a matmul on the GPU.runpod/pytorch:1.2.0-rc.162-…)cu1281-torch2121-ubuntu2204cu1281-torch2121-ubuntu2404cu1281-torch2130-ubuntu2204cu1281-torch2130-ubuntu2404cu1290-torch2121-ubuntu2204cu1290-torch2121-ubuntu2404cu1290-torch2130-ubuntu2204cu1290-torch2130-ubuntu2404cu1300-torch2120-ubuntu2404cu1300-torch2121-ubuntu2404cu1300-torch2130-ubuntu2404Follow-ups
Hostname→hostnamelabel rename.