Skip to content
This repository was archived by the owner on Sep 4, 2025. It is now read-only.

Commit 0dcc6ca

Browse files
committed
Dockerfile.ubi: get rid of prebuilt-wheel stage
Building a more recent version of the vllm code with fixed `.so` from specific releases might end up breaking features if the python code contains references to features that aren't present in the downloaded wheel.
1 parent 255735f commit 0dcc6ca

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

Dockerfile.ubi

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
ARG BASE_UBI_IMAGE_TAG=9.4
66
ARG PYTHON_VERSION=3.11
77

8-
# NOTE: This setting only has an effect when not using prebuilt-wheel kernels
98
ARG TORCH_CUDA_ARCH_LIST="7.0 7.5 8.0 8.6 8.9 9.0+PTX"
109

1110

@@ -136,24 +135,6 @@ RUN --mount=type=cache,target=/root/.cache/pip \
136135
--mount=type=bind,source=proto,target=proto \
137136
make gen-protos
138137

139-
## Extension Cache #############################################################
140-
# Instead of compiling artifacts every build just copy from pre-built wheel
141-
# This might not work if the PyTorch and CUDA versions don't match!
142-
FROM base as prebuilt-wheel
143-
144-
RUN microdnf install -y \
145-
unzip \
146-
&& microdnf clean all
147-
148-
ARG PYTHON_VERSION
149-
# 0.4.2 is built for CUDA 12.1 and PyTorch 2.3.0
150-
ARG VLLM_WHEEL_VERSION=0.4.2
151-
152-
RUN curl -Lo vllm.whl https://github.com/vllm-project/vllm/releases/download/v${VLLM_WHEEL_VERSION}/vllm-${VLLM_WHEEL_VERSION}-cp${PYTHON_VERSION//.}-cp${PYTHON_VERSION//.}-manylinux1_x86_64.whl \
153-
&& unzip vllm.whl \
154-
&& rm vllm.whl
155-
# compiled extensions located at /workspace/vllm/*.so
156-
157138
## Builder #####################################################################
158139
FROM dev AS build
159140

@@ -194,10 +175,6 @@ ENV LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
194175
# Copy the entire directory before building wheel
195176
COPY vllm vllm
196177

197-
# Comment if building *.so files from scratch
198-
##################################################
199-
# Copy the prebuilt *.so files
200-
COPY --from=prebuilt-wheel /workspace/vllm/*.so /workspace/vllm/
201178
##################################################
202179

203180
# Copy over the generated *.pb2 files
@@ -206,7 +183,7 @@ COPY --from=gen-protos /workspace/vllm/entrypoints/grpc/pb vllm/entrypoints/grpc
206183
ENV CCACHE_DIR=/root/.cache/ccache
207184
RUN --mount=type=cache,target=/root/.cache/ccache \
208185
--mount=type=cache,target=/root/.cache/pip \
209-
VLLM_USE_PRECOMPILED=1 python3 setup.py bdist_wheel --dist-dir=dist
186+
python3 setup.py bdist_wheel --dist-dir=dist
210187

211188
#################### FLASH_ATTENTION Build IMAGE ####################
212189
FROM dev as flash-attn-builder

0 commit comments

Comments
 (0)