Skip to content

Add Ubuntu 24.04 support for Docker builds#35386

Merged
vllm-bot merged 7 commits intovllm-project:mainfrom
aasgaonkar:ubuntu-2404-support
Mar 24, 2026
Merged

Add Ubuntu 24.04 support for Docker builds#35386
vllm-bot merged 7 commits intovllm-project:mainfrom
aasgaonkar:ubuntu-2404-support

Conversation

@aasgaonkar
Copy link
Copy Markdown
Contributor

@aasgaonkar aasgaonkar commented Feb 26, 2026

Purpose

Adds Ubuntu 24.04 as an opt-in build target for vLLM Docker release images, closing #35118.

Changes:

  • docker/Dockerfile: Add UBUNTU_VERSION ARG (default 22.04) to parameterize
    FINAL_BASE_IMAGE. Install python${PYTHON_VERSION}-dev before apt cache cleanup (required by
    cmake 3.28 on Ubuntu 24.04 for Development.SABIModule). Remove python3-pip from final stage
    apt deps to avoid conflict with get-pip.py on Ubuntu 24.04 (pip 24.0 ships without a RECORD
    file). Remove EXTERNALLY-MANAGED marker to allow pip installs into the system Python.
  • docker/docker-bake.hcl: Add test-ubuntu2404 and openai-ubuntu2404 targets with
    UBUNTU_VERSION=24.04, GDRCOPY_OS_VERSION=Ubuntu24_04, and FLASHINFER_AOT_COMPILE=true.
  • docker/versions.json: Add UBUNTU_VERSION with default "22.04".
  • .buildkite/release-pipeline.yaml: Add 4 new release pipeline steps (x86_64 + aarch64 for
    CUDA 12.9 and 13.0, all with Ubuntu 24.04) and 2 multi-arch manifest steps. CUDA 13.0 steps
    explicitly pass BUILD_BASE_IMAGE=nvidia/cuda:13.0.1-devel-ubuntu24.04 since NVIDIA does not
    publish CUDA 13.x devel images for Ubuntu 20.04 (the Dockerfile default).

Test Plan

Built and tested all 4 Ubuntu 24.04 image variants locally:

CUDA 12.9 + Ubuntu 24.04

docker build --build-arg CUDA_VERSION=12.9.1 --build-arg UBUNTU_VERSION=24.04 \
--build-arg GDRCOPY_OS_VERSION=Ubuntu24_04 --build-arg FLASHINFER_AOT_COMPILE=true \
--target vllm-openai -f docker/Dockerfile .

CUDA 13.0 + Ubuntu 24.04

docker build --build-arg CUDA_VERSION=13.0.1 --build-arg UBUNTU_VERSION=24.04 \
--build-arg GDRCOPY_OS_VERSION=Ubuntu24_04 --build-arg FLASHINFER_AOT_COMPILE=true \
--build-arg BUILD_BASE_IMAGE=nvidia/cuda:13.0.1-devel-ubuntu24.04 \
--target vllm-openai -f docker/Dockerfile .

Test Result

Test: vllm.entrypoints.openai.api_server with facebook/opt-125m, prompt "The capital of France is", max_tokens=20, temperature=0. Multi-GPU test uses --tensor-parallel-size 4
across 4×A100. Ubuntu 22.04 rows verify no regression in existing builds.

Configuration Single GPU TP=4
CUDA 12.9 + Ubuntu 24.04 (new) Pass Pass
CUDA 13.0 + Ubuntu 24.04 (new) Pass Pass
CUDA 12.9 + Ubuntu 22.04 (existing) Pass Pass
CUDA 13.0 + Ubuntu 22.04 (existing) Pass Pass

Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

@mergify mergify bot added the ci/build label Feb 26, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request successfully adds support for Ubuntu 24.04 across Docker builds, including new build arguments, parameterized base images, and updated release pipeline steps. The fix for the EXTERNALLY-MANAGED pip issue is crucial for compatibility with newer Ubuntu versions. However, there's an inconsistency in the .buildkite/release-pipeline.yaml regarding the BUILD_BASE_IMAGE for CUDA 13.0 Ubuntu 24.04 builds.

Comment on lines +539 to +540
&& rm -f /usr/lib/python${PYTHON_VERSION}/EXTERNALLY-MANAGED \
&& rm -rf /usr/lib/python3/dist-packages/pip /usr/lib/python3/dist-packages/pip-*.dist-info \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

Removing the EXTERNALLY-MANAGED file and existing pip installations is a critical step to ensure pip functions correctly on newer Ubuntu versions (like 24.04) where Python's pip is externally managed by default. This directly addresses a potential breakage in the build process.

queue: arm64_cpu_queue_postmerge
commands:
- "aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/q9t5s3a7"
- "DOCKER_BUILDKIT=1 docker build --build-arg max_jobs=16 --build-arg USE_SCCACHE=1 --build-arg GIT_REPO_CHECK=1 --build-arg CUDA_VERSION=13.0.1 --build-arg UBUNTU_VERSION=24.04 --build-arg GDRCOPY_OS_VERSION=Ubuntu24_04 --build-arg torch_cuda_arch_list='8.7 8.9 9.0 10.0+PTX 12.0 12.1' --build-arg INSTALL_KV_CONNECTORS=true --build-arg BUILD_BASE_IMAGE=nvidia/cuda:13.0.1-devel-ubuntu22.04 --tag public.ecr.aws/q9t5s3a7/vllm-release-repo:$BUILDKITE_COMMIT-$(uname -m)-cu130-ubuntu2404 --target vllm-openai --progress plain -f docker/Dockerfile ."
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Similar to the x86_64 build, the BUILD_BASE_IMAGE for the aarch64 CUDA 13.0 Ubuntu 24.04 build is explicitly set to nvidia/cuda:13.0.1-devel-ubuntu22.04. This should be updated to ubuntu24.04 for consistency with the UBUNTU_VERSION argument, or adjusted based on the intended base image strategy.

          - "DOCKER_BUILDKIT=1 docker build --build-arg max_jobs=16 --build-arg USE_SCCACHE=1 --build-arg GIT_REPO_CHECK=1 --build-arg CUDA_VERSION=13.0.1 --build-arg UBUNTU_VERSION=24.04 --build-arg GDRCOPY_OS_VERSION=Ubuntu24_04 --build-arg torch_cuda_arch_list='8.7 8.9 9.0 10.0+PTX 12.0 12.1' --build-arg INSTALL_KV_CONNECTORS=true --build-arg BUILD_BASE_IMAGE=nvidia/cuda:13.0.1-devel-ubuntu24.04 --tag public.ecr.aws/q9t5s3a7/vllm-release-repo:$BUILDKITE_COMMIT-$(uname -m)-cu130-ubuntu2404 --target vllm-openai --progress plain -f docker/Dockerfile ."

@github-actions
Copy link
Copy Markdown

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors.

You ask your reviewers to trigger select CI tests on top of fastcheck CI.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

If you have any questions, please reach out to us on Slack at https://slack.vllm.ai.

🚀

- Add UBUNTU_VERSION build arg to Dockerfile, defaulting to 22.04
- Parameterize FINAL_BASE_IMAGE to use UBUNTU_VERSION
- Fix pip EXTERNALLY-MANAGED issue for newer Ubuntu versions
- Add Ubuntu 24.04 build targets in docker-bake.hcl
- Add Ubuntu 24.04 release pipeline steps for x86_64 and aarch64
  (CUDA 12.9 and 13.0) with multi-arch manifests

Signed-off-by: aasgaonkar <aasgaonkar@nvidia.com>
Update BUILD_BASE_IMAGE from ubuntu22.04 to ubuntu24.04 for the
CUDA 13.0 + Ubuntu 24.04 release pipeline steps to be consistent
with the UBUNTU_VERSION=24.04 build arg.

Signed-off-by: aasgaonkar <aasgaonkar@nvidia.com>
Three bug fixes found during local build testing of Ubuntu 24.04 images:

1. docker/Dockerfile (base stage): Install python${PYTHON_VERSION}-dev before
   apt cache cleanup. Ubuntu 24.04 ships cmake 3.28 which requires the
   Development.SABIModule component; without Python headers the csrc-build
   stage fails with "Could NOT find Python (missing: Python_INCLUDE_DIRS
   Development.SABIModule)". The install is best-effort (|| true) so it
   silently no-ops on Ubuntu 20.04/22.04 where the package is not in the
   default repos.

2. docker/Dockerfile (vllm-base stage): Remove python3-pip from apt deps.
   On Ubuntu 24.04, apt installs pip 24.0 without a RECORD file, causing
   get-pip.py to fail with "Cannot uninstall pip 24.0: no RECORD file was
   found". Removing python3-pip from apt lets get-pip.py install pip fresh
   with no conflict.

3. .buildkite/release-pipeline.yaml: Add FLASHINFER_AOT_COMPILE=true to
   the CUDA 13.0 + Ubuntu 24.04 build steps (x86_64 and aarch64). It was
   already set on the CUDA 12.9 + Ubuntu 24.04 steps; without it the
   CUDA 13.0 Ubuntu 24.04 images silently fall back to slow JIT compilation
   at runtime.

Signed-off-by: aasgaonkar <aasgaonkar@nvidia.com>
@aasgaonkar aasgaonkar force-pushed the ubuntu-2404-support branch from 14d350e to 6c964bd Compare March 18, 2026 22:57
aasgaonkar and others added 3 commits March 19, 2026 00:30
- Add torch_cuda_arch_list='8.7 8.9 9.0 10.0+PTX 12.0' to x86_64 CUDA 12.9
  Ubuntu 24.04 release build, matching aarch64 and existing Ubuntu 22.04 builds
- Add torch_cuda_arch_list='8.7 8.9 9.0 10.0+PTX 12.0 12.1' to x86_64 CUDA 13.0
  Ubuntu 24.04 release build, matching aarch64 counterpart
- Add FLASHINFER_AOT_COMPILE=true to test-ubuntu2404 and openai-ubuntu2404
  docker-bake.hcl targets to match CI pipeline and avoid silent JIT fallback

Signed-off-by: aasgaonkar <aasgaonkar@nvidia.com>
@aasgaonkar aasgaonkar marked this pull request as ready for review March 21, 2026 01:05
@mgoin mgoin added the ready ONLY add when PR is ready to merge/full CI is needed label Mar 24, 2026
Copy link
Copy Markdown
Member

@mgoin mgoin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me!

@vllm-bot vllm-bot merged commit 0c1809c into vllm-project:main Mar 24, 2026
133 of 136 checks passed
RhizoNymph pushed a commit to RhizoNymph/vllm that referenced this pull request Mar 26, 2026
Signed-off-by: aasgaonkar <aasgaonkar@nvidia.com>
HenryTangDev pushed a commit to HenryTangMain/vllm that referenced this pull request Mar 27, 2026
Signed-off-by: aasgaonkar <aasgaonkar@nvidia.com>
malaiwah pushed a commit to malaiwah/vllm that referenced this pull request Mar 27, 2026
Signed-off-by: aasgaonkar <aasgaonkar@nvidia.com>
Signed-off-by: Michel Belleau <michel.belleau@malaiwah.com>
khairulkabir1661 pushed a commit to khairulkabir1661/vllm that referenced this pull request Mar 27, 2026
Signed-off-by: aasgaonkar <aasgaonkar@nvidia.com>
Monishver11 pushed a commit to Monishver11/vllm that referenced this pull request Mar 27, 2026
Signed-off-by: aasgaonkar <aasgaonkar@nvidia.com>
Signed-off-by: Monishver Chandrasekaran <monishverchandrasekaran@gmail.com>
nithinvc pushed a commit to nithinvc/vllm that referenced this pull request Mar 27, 2026
Signed-off-by: aasgaonkar <aasgaonkar@nvidia.com>

Signed-off-by: Nithin Chalapathi <nithin.ch10@gmail.com>
JiantaoXu pushed a commit to JiantaoXu/vllm that referenced this pull request Mar 28, 2026
Signed-off-by: aasgaonkar <aasgaonkar@nvidia.com>
khluu pushed a commit that referenced this pull request Mar 30, 2026
Signed-off-by: aasgaonkar <aasgaonkar@nvidia.com>
(cherry picked from commit 0c1809c)
vrdn-23 pushed a commit to vrdn-23/vllm that referenced this pull request Mar 30, 2026
Signed-off-by: aasgaonkar <aasgaonkar@nvidia.com>
Signed-off-by: Vinay Damodaran <vrdn@hey.com>
EricccYang pushed a commit to EricccYang/vllm that referenced this pull request Apr 1, 2026
Signed-off-by: aasgaonkar <aasgaonkar@nvidia.com>
Signed-off-by: EricccYang <yangyang4991@gmail.com>
bhargav-patel-29 pushed a commit to Bharatgen-Tech/vllm that referenced this pull request Apr 1, 2026
Signed-off-by: aasgaonkar <aasgaonkar@nvidia.com>
Signed-off-by: bhargav-patel-29 <bhargav.patel@tihiitb.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/build ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants