@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / cfd2573f23
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 4, 08:45 UTC

[Build] Switch CUDA 13.0 wheel builds to PyTorch manylinux_2_28 base (#41416)

Signed-off-by: mgoin <mgoin64@gmail.com> Co-authored-by: Claude <noreply@anthropic.com>

Michael Goin committed May 2, 2026 at 08:51 UTC cfd2573f239f8e5be370b0148809e25ea5bb0a3e
3 files changed +72 -28
.buildkite/release-pipeline.yaml
+2 -2
@@ -37,7 +37,7 @@ steps:
37 agents:
38 queue: arm64_cpu_queue_release
39 commands:
40 - - "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.2 --build-arg torch_cuda_arch_list=\"${CUDA_ARCH_AARCH64}\" --build-arg BUILD_BASE_IMAGE=nvidia/cuda:13.0.2-devel-ubuntu22.04 --tag vllm-ci:build-image --target build --progress plain -f docker/Dockerfile ."
40 + - "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.2 --build-arg torch_cuda_arch_list=\"${CUDA_ARCH_AARCH64}\" --build-arg BUILD_OS=manylinux --build-arg BUILD_BASE_IMAGE=pytorch/manylinuxaarch64-builder:cuda13.0 --tag vllm-ci:build-image --target build --progress plain -f docker/Dockerfile ."
41 - "mkdir artifacts"
42 - "docker run --rm -v $(pwd)/artifacts:/artifacts_host vllm-ci:build-image bash -c 'cp -r dist /artifacts_host && chmod -R a+rw /artifacts_host'"
43 - "bash .buildkite/scripts/upload-nightly-wheels.sh"
@@ -76,7 +76,7 @@ steps:
76 agents:
77 queue: cpu_queue_release
78 commands:
79 - - "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.2 --build-arg torch_cuda_arch_list=\"${CUDA_ARCH_X86}\" --build-arg BUILD_BASE_IMAGE=nvidia/cuda:13.0.2-devel-ubuntu22.04 --tag vllm-ci:build-image --target build --progress plain -f docker/Dockerfile ."
79 + - "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.2 --build-arg torch_cuda_arch_list=\"${CUDA_ARCH_X86}\" --build-arg BUILD_OS=manylinux --build-arg BUILD_BASE_IMAGE=pytorch/manylinux2_28-builder:cuda13.0 --tag vllm-ci:build-image --target build --progress plain -f docker/Dockerfile ."
80 - "mkdir artifacts"
81 - "docker run --rm -v $(pwd)/artifacts:/artifacts_host vllm-ci:build-image bash -c 'cp -r dist /artifacts_host && chmod -R a+rw /artifacts_host'"
82 - "bash .buildkite/scripts/upload-nightly-wheels.sh"
docker/Dockerfile
+67 -26
@@ -41,6 +41,13 @@ ARG BUILD_BASE_IMAGE=nvidia/cuda:${CUDA_VERSION}-devel-ubuntu22.04
41 # Using cuda base image with minimal dependencies necessary for JIT compilation (FlashInfer, DeepGEMM, EP kernels)
42 ARG FINAL_BASE_IMAGE=nvidia/cuda:${CUDA_VERSION}-base-ubuntu${UBUNTU_VERSION}
43
44 +# OS family of BUILD_BASE_IMAGE. Controls package manager (apt vs dnf) and
45 +# Python bootstrap. Set to "manylinux" alongside a manylinux build base such
46 +# as pytorch/manylinux2_28-builder:cuda13.0 to produce wheels with a glibc
47 +# 2.28 floor (matches PyTorch's own published wheels). Default stays on
48 +# Ubuntu for backwards compatibility.
49 +ARG BUILD_OS=ubuntu
50 +
51 # By parameterizing the Deadsnakes repository URL, we allow third-party to use
52 # their own mirror. When doing so, we don't benefit from the transparent
53 # installation of the GPG key of the PPA, as done by add-apt-repository, so we
@@ -94,35 +101,64 @@ FROM ${BUILD_BASE_IMAGE} AS base
101
102 ARG CUDA_VERSION
103 ARG PYTHON_VERSION
104 +ARG BUILD_OS
105
106 ENV DEBIAN_FRONTEND=noninteractive
107
100 -# Install system dependencies including build tools
101 -RUN apt-get update -y \
102 - && apt-get install -y --no-install-recommends \
103 - ccache \
104 - software-properties-common \
105 - git \
106 - curl \
107 - sudo \
108 - python3-pip \
109 - libibverbs-dev \
110 - # Upgrade to GCC 10 to avoid https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92519
111 - # as it was causing spam when compiling the CUTLASS kernels
112 - gcc-10 \
113 - g++-10 \
114 - && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 110 --slave /usr/bin/g++ g++ /usr/bin/g++-10 \
115 - # Install python dev headers if available (needed for cmake FindPython on Ubuntu 24.04
116 - # which ships cmake 3.28 and requires Development.SABIModule; silently skipped on
117 - # Ubuntu 20.04/22.04 where python3.x-dev is not available without a PPA)
118 - && (apt-get install -y --no-install-recommends python${PYTHON_VERSION}-dev 2>/dev/null || true) \
119 - && rm -rf /var/lib/apt/lists/* \
120 - && curl -LsSf https://astral.sh/uv/install.sh | sh \
121 - && $HOME/.local/bin/uv venv /opt/venv --python ${PYTHON_VERSION} \
108 +# Install system dependencies including build tools.
109 +# The Ubuntu path uses apt + deadsnakes-via-uv for Python; the manylinux path
110 +# (AlmaLinux 8, e.g. pytorch/manylinux2_28-builder) uses dnf and the Python
111 +# interpreters pre-installed at /opt/python/cpXY-cpXY/.
112 +RUN if [ "${BUILD_OS}" = "manylinux" ]; then \
113 + # rdma-core-devel provides libibverbs headers; ccache lives in EPEL,
114 + # which the pytorch manylinux image already enables. git/curl/sudo
115 + # are typically pre-installed but listed defensively.
116 + dnf install -y --setopt=install_weak_deps=False \
117 + ccache \
118 + git \
119 + curl \
120 + sudo \
121 + rdma-core-devel \
122 + && dnf clean all \
123 + && rm -rf /var/cache/dnf; \
124 + else \
125 + apt-get update -y \
126 + && apt-get install -y --no-install-recommends \
127 + ccache \
128 + software-properties-common \
129 + git \
130 + curl \
131 + sudo \
132 + python3-pip \
133 + libibverbs-dev \
134 + # Upgrade to GCC 10 to avoid https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92519
135 + # as it was causing spam when compiling the CUTLASS kernels
136 + gcc-10 \
137 + g++-10 \
138 + && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 110 --slave /usr/bin/g++ g++ /usr/bin/g++-10 \
139 + # Install python dev headers if available (needed for cmake FindPython on Ubuntu 24.04
140 + # which ships cmake 3.28 and requires Development.SABIModule; silently skipped on
141 + # Ubuntu 20.04/22.04 where python3.x-dev is not available without a PPA)
142 + && (apt-get install -y --no-install-recommends python${PYTHON_VERSION}-dev 2>/dev/null || true) \
143 + && rm -rf /var/lib/apt/lists/*; \
144 + fi
145 +
146 +# Install uv and bootstrap /opt/venv. Both paths converge on /opt/venv so all
147 +# downstream stages stay distro-agnostic.
148 +RUN curl -LsSf https://astral.sh/uv/install.sh | sh \
149 + && if [ "${BUILD_OS}" = "manylinux" ]; then \
150 + # manylinux images ship Python at /opt/python/cpXY-cpXY/; point uv
151 + # at the matching interpreter rather than letting it fetch one.
152 + PYV_NODOT=$(echo ${PYTHON_VERSION} | tr -d '.') \
153 + && MANYLINUX_PY=/opt/python/cp${PYV_NODOT}-cp${PYV_NODOT}/bin/python${PYTHON_VERSION} \
154 + && $HOME/.local/bin/uv venv /opt/venv --python "$MANYLINUX_PY"; \
155 + else \
156 + $HOME/.local/bin/uv venv /opt/venv --python ${PYTHON_VERSION}; \
157 + fi \
158 && rm -f /usr/bin/python3 /usr/bin/python3-config /usr/bin/pip \
123 - && ln -s /opt/venv/bin/python3 /usr/bin/python3 \
124 - && ln -s /opt/venv/bin/python3-config /usr/bin/python3-config \
125 - && ln -s /opt/venv/bin/pip /usr/bin/pip \
159 + && ln -sf /opt/venv/bin/python3 /usr/bin/python3 \
160 + && ln -sf /opt/venv/bin/python3-config /usr/bin/python3-config \
161 + && ln -sf /opt/venv/bin/pip /usr/bin/pip \
162 && python3 --version && python3 -m pip --version
163
164 # Activate virtual environment and add uv to PATH
@@ -433,6 +469,7 @@ FROM base AS dev
469 ARG PIP_INDEX_URL UV_INDEX_URL
470 ARG PIP_EXTRA_INDEX_URL UV_EXTRA_INDEX_URL
471 ARG PYTORCH_CUDA_INDEX_BASE_URL
472 +ARG BUILD_OS
473
474 # This timeout (in seconds) is necessary when installing some dependencies via uv since it's likely to time out
475 # Reference: https://github.com/astral-sh/uv/pull/1694
@@ -442,7 +479,11 @@ ENV UV_INDEX_STRATEGY="unsafe-best-match"
479 ENV UV_LINK_MODE=copy
480
481 # Install libnuma-dev, required by fastsafetensors (fixes #20384)
445 -RUN apt-get update && apt-get install -y --no-install-recommends libnuma-dev && rm -rf /var/lib/apt/lists/*
482 +RUN if [ "${BUILD_OS}" = "manylinux" ]; then \
483 + dnf install -y numactl-devel && dnf clean all && rm -rf /var/cache/dnf; \
484 + else \
485 + apt-get update && apt-get install -y --no-install-recommends libnuma-dev && rm -rf /var/lib/apt/lists/*; \
486 + fi
487
488
489 # We can specify the standard or nightly build of PyTorch
docker/versions.json
+3
@@ -16,6 +16,9 @@
16 "FINAL_BASE_IMAGE": {
17 "default": "nvidia/cuda:13.0.2-base-ubuntu22.04"
18 },
19 + "BUILD_OS": {
20 + "default": "ubuntu"
21 + },
22 "GET_PIP_URL": {
23 "default": "https://bootstrap.pypa.io/get-pip.py"
24 },