Skip to main content

SKY-GPU001 · Deployment and infrastructure

CUDA image needs a newer NVIDIA driver than the targets have

High

Each CUDA major version needs a minimum NVIDIA driver: CUDA 12 needs driver branch 525 on Linux (528 on Windows), CUDA 13 needs 580. SKY-GPU001 reports a Docker image built on nvidia/cuda whose CUDA version needs a newer driver than a target in your GPU contract has.

Languages
Dockerfile, GPU target contract (YAML)
Quality gate
counted toward the gate limits (full and diff scans). Reported under reliability. It counts toward max_reliability, which is 0 by default, so one finding fails --gate.
Needs
A .skylos/gpu-targets.yml contract in the repository.
Finding type
review
Catalog name
CUDA image requires newer NVIDIA driver
Wrong result? Report itA false positive, a missed case or a confusing message: it goes privately to the founder.

Why it matters

The container builds and passes CI on a developer's newer driver, then fails on the production fleet with "CUDA driver version is insufficient for CUDA runtime version" as soon as it touches the GPU.

What Skylos flags

Dockerfile · DockerfileReported on line 1
FROM nvidia/cuda:12.4.1-runtime-ubuntu22.04COPY app /appCMD ["python3", "/app/serve.py"]
.skylos/gpu-targets.yml · YAML
version: 1targets:  - name: legacy-t4-fleet    vendor: nvidia    driver: "510.47.03"    platform: linux/amd64

What Skylos leaves alone

Dockerfile · Dockerfile
FROM nvidia/cuda:11.8.0-runtime-ubuntu22.04COPY app /appCMD ["python3", "/app/serve.py"]

.skylos/gpu-targets.yml: same as in the flagged example.

Why Skylos leaves it alone

The same old fleet, but the image uses CUDA 11.8, which runs on driver branch 450 and newer. Driver 510 is enough.

How Skylos decides

  1. Runs with --danger (or -a), and only when the repository has a GPU target contract: .skylos/gpu-targets.yml (or .yaml), version 1, listing each target's name, vendor: nvidia, and its driver, compute_capability and platform (linux or windows, optionally /amd64 or /arm64). Without the file nothing is checked, unless an SKY-GPU rule is selected explicitly with --select.
  2. Reads Dockerfiles, CMake files, Makefiles, Bazel files, shell scripts, Python, C/C++/CUDA sources and YAML as text, skipping build, dist, node_modules, caches and virtual environments. It never runs a build or probes a GPU.
  3. Finds the final stage of each Dockerfile, following stage aliases and literal ARG values, and reads its nvidia/cuda:<version> image tag. Intermediate build stages do not count.
  4. Compares the CUDA major version's minimum driver branch with each target's driver, using the Windows floor for Windows targets.
  5. A cuda-compat package in the image is not taken as proof that the old driver works.
  6. Reports HIGH on the FROM line, naming the targets that are too old.

How to fix it

Use a CUDA image the fleet's driver supports, or upgrade the drivers first and then raise driver in the contract.

Dockerfile · Dockerfile · the fix, against the flagged file
Removed: FROM nvidia/cuda:12.4.1-runtime-ubuntu22.04Added: FROM nvidia/cuda:11.8.0-runtime-ubuntu22.04COPY app /appCMD ["python3", "/app/serve.py"]

When it can be wrong

  • Teams that rely on NVIDIA's forward-compatibility package (cuda-compat) on data-centre GPUs are still reported, because that path depends on the exact GPU, driver and loader setup.

Seeing a case that isn't listed here? Report the wrong result so the rule can be fixed. Don't paste company code: describe the shape of it.

How to silence it

  • Put the marker in a comment on the line above FROM. A trailing # on the FROM line itself is not a comment to Docker.

    Dockerfile
    # skylos: ignore[SKY-GPU001] fleet uses the cuda-compat package, testedFROM nvidia/cuda:12.4.1-runtime-ubuntu22.04
  • [tool.skylos] ignore = ["SKY-GPU001"] turns the rule off for the project.

  • A baseline (skylos baseline ., then --baseline) accepts the findings that exist today and reports new ones.

From the Skylos rule handbook, Skylos 5.8.0 (commit 5b880b0). All rules.