Skip to content

fix: use correct NVIDIA CUDA base images for debian distro#5590

Merged
frostming merged 2 commits intobentoml:mainfrom
mattmorganpdx:fix/cuda-version-debian-distro
Apr 2, 2026
Merged

fix: use correct NVIDIA CUDA base images for debian distro#5590
frostming merged 2 commits intobentoml:mainfrom
mattmorganpdx:fix/cuda-version-debian-distro

Conversation

@mattmorganpdx
Copy link
Copy Markdown
Contributor

What does this PR address?

The cuda_version option in bentofile.yaml is completely broken for the default
debian distro. The hardcoded image template
nvidia/cuda:{version}-cudnn-runtime-ubuntu24.04 generates tags that don't exist on
Docker Hub for any of the previously supported CUDA versions (≤12.1.1), because:

  1. NVIDIA never published CUDA 12.1.x or older images for ubuntu24.04
  2. The -cudnn- naming (without a version number) only started with CUDA 12.6+; older
    images use -cudnn8-

Changes:

  • Add CUDA 12.6.x and 12.8.x versions to SUPPORTED_CUDA_VERSIONS and
    ALLOWED_CUDA_VERSION_ARGS — these are the versions that actually exist for
    ubuntu24.04
  • Introduce get_cuda_base_image() to select the correct base image per version:
    ubuntu24.04 with -cudnn- for ≥12.6.0, ubuntu22.04 with -cudnn8- for ≤12.1.1
  • Update DEFAULT_CUDA_VERSION from 11.6.2 to 12.8.1
  • Use get_cuda_base_image() in generate.py instead of formatting the static
    template, so ubi8 and other distros continue to work unchanged
  • Add unit tests for CUDA image resolution and version mapping

Fixes #5589

Before submitting:

The debian distro's CUDA image template hardcoded ubuntu24.04 with the
newer -cudnn- naming, but none of the previously supported CUDA versions
(≤12.1.1) have images published for ubuntu24.04, and the -cudnn- naming
only started with CUDA 12.6+. This made cuda_version completely
non-functional for the default debian distro.

- Add CUDA 12.6.x and 12.8.x to supported versions
- Introduce get_cuda_base_image() to select ubuntu24.04/-cudnn- for
  ≥12.6.0 and ubuntu22.04/-cudnn8- for ≤12.1.1
- Update DEFAULT_CUDA_VERSION to 12.8.1
- Add unit tests for CUDA image resolution and version mapping

Fixes bentoml#5589

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mattmorganpdx mattmorganpdx requested a review from a team as a code owner March 31, 2026 21:29
@mattmorganpdx mattmorganpdx requested review from frostming and removed request for a team March 31, 2026 21:29
@frostming frostming merged commit 009d68e into bentoml:main Apr 2, 2026
50 of 51 checks passed
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.

bug: The cuda_version option in bentofile.yaml is broken for the default debian distro in BentoML 1.4.35–1.4.37.

2 participants