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

Commit 15076fa

Browse files
njhilljoerunde
andauthored
Compile kernels and fix build (#17)
These Dockerfile changes: - Update the release stage to work with the recently refactored `requirements-common.txt` / `requirements-cuda.txt` split - Fixup the kernel compilation in the `build` stage to correctly pick up cuda - Install the kernels from this docker build rather than pulling a precompiled wheel. We can swap that back once a new wheel is available with the correct pytorch version + updated interfaces --------- Signed-off-by: Nick Hill <[email protected]> Signed-off-by: Joe Runde <[email protected]> Co-authored-by: Joe Runde <[email protected]>
1 parent 3743fae commit 15076fa

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Dockerfile.ubi

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@ ENV NVCC_THREADS=$nvcc_threads
175175
# make sure punica kernels are built (for LoRA)
176176
ENV VLLM_INSTALL_PUNICA_KERNELS=1
177177

178+
# Setup path stuff? Ref: https://github.com/vllm-project/vllm/blob/main/.github/workflows/scripts/build.sh#L6-L8
179+
ENV PATH=/usr/local/cuda/bin:$PATH
180+
ENV LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
181+
178182
RUN python3 setup.py build_ext --inplace
179183

180184

@@ -257,7 +261,7 @@ FROM base AS vllm
257261
WORKDIR /vllm-staging
258262
# COPY files from various places into a staging directory
259263
COPY --link vllm vllm
260-
COPY --from=prebuilt-wheel --link /workspace/vllm/*.so vllm/
264+
COPY --from=build --link /workspace/vllm/*.so vllm/
261265
COPY --from=gen-protos --link /workspace/vllm/entrypoints/grpc/pb vllm/entrypoints/grpc/pb
262266

263267
# custom COPY command to use umask to control permissions and grant permissions
@@ -281,9 +285,10 @@ COPY --from=python-torch-base --link /opt/vllm /opt/vllm
281285
ENV PATH=/opt/vllm/bin/:$PATH
282286

283287
RUN --mount=type=cache,target=/root/.cache/pip \
284-
--mount=type=bind,source=requirements.txt,target=requirements.txt \
288+
--mount=type=bind,source=requirements-common.txt,target=requirements-common.txt \
289+
--mount=type=bind,source=requirements-cuda.txt,target=requirements-cuda.txt \
285290
pip3 install \
286-
-r requirements.txt \
291+
-r requirements-cuda.txt \
287292
# additional dependencies for the TGIS gRPC server
288293
grpcio-tools==1.62.1 \
289294
# additional dependencies for openai api_server

0 commit comments

Comments
 (0)