Skip to content

build(gpu): make the CUDA runtime base a build ARG (T4 fleet)#496

Open
kriszyp wants to merge 1 commit into
mainfrom
kris/dockerfile-gpu-cuda-arg
Open

build(gpu): make the CUDA runtime base a build ARG (T4 fleet)#496
kriszyp wants to merge 1 commit into
mainfrom
kris/dockerfile-gpu-cuda-arg

Conversation

@kriszyp

@kriszyp kriszyp commented Jun 26, 2026

Copy link
Copy Markdown
Member

Small hardening for the upcoming GCP T4 GPU fleet, alongside host-manager#125.

TL;DR on the CUDA-13 question

Dockerfile-gpu builds on nvidia/cuda:13.3.0-cudnn-runtime-ubuntu22.04, and I'd flagged a worry that CUDA 13 might have dropped Turing. It hasn't — CUDA 13.x makes Turing (SM 7.5 / T4) the minimum supported architecture; it's Maxwell/Pascal/Volta that were removed. So the current base runs on T4 as-is, no arch change needed.

The one real caveat: the CUDA 13.x runtime requires an R580+ host driver. On a new cloud fleet, GPU host images often lag on driver branch (535/550 LTS are common), so a host could be too old for the 13.x runtime.

Change

Expose the runtime base as a build ARG so ops can pin a CUDA 12.x base on driver-constrained hosts without forking the Dockerfile:

ARG CUDA_RUNTIME_IMAGE=nvidia/cuda:13.3.0-cudnn-runtime-ubuntu22.04
FROM ${CUDA_RUNTIME_IMAGE} AS run

Override example:

docker build -f Dockerfile-gpu \
  --build-arg CUDA_RUNTIME_IMAGE=nvidia/cuda:12.6.3-cudnn-runtime-ubuntu22.04 .

Default is unchanged (13.3.0), so existing builds are byte-identical.

Context / scope

In the shared-vLLM design (host-manager#125) tenant containers reach embeddings/generation by HTTP to the host vLLM, so this image's CUDA runtime is only exercised by in-instance GPU code (e.g. a native addon). For the embedding-first T4 rollout it's largely latent — this ARG is forward-looking flexibility, not a fix for a current break.

Sources for the CUDA-13/Turing + R580 facts:

🤖 Generated with Claude Code

CUDA 13.x supports Turing (SM 7.5 / T4) — Turing is the minimum architecture in
the 13.x line, so the current 13.3.0 base runs on the GCP T4 fleet as-is. The
13.x runtime does, however, require an R580+ host driver. To avoid forking the
Dockerfile on hosts pinned to an older driver branch, expose the runtime base as
CUDA_RUNTIME_IMAGE (default unchanged at nvidia/cuda:13.3.0-cudnn-runtime-ubuntu22.04),
overridable to a CUDA 12.x cudnn-runtime base at build time.

No default behavior change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kriszyp kriszyp requested a review from a team as a code owner June 26, 2026 13:39
@kriszyp kriszyp requested a review from kylebernhardy June 26, 2026 13:39
@claude

claude Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Reviewed; no blockers found.

@kriszyp kriszyp requested review from Devin-Holland and sleekmountaincat and removed request for a team and kylebernhardy June 26, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant