Skip to content

Commit 7976446

Browse files
authored
Add Dockerfile argument for VLLM_USE_PRECOMPILED environment (#20943)
Signed-off-by: dougbtv <dosmith@redhat.com>
1 parent fcb9f87 commit 7976446

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docker/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,19 @@ ARG SCCACHE_ENDPOINT
207207
ARG SCCACHE_BUCKET_NAME=vllm-build-sccache
208208
ARG SCCACHE_REGION_NAME=us-west-2
209209
ARG SCCACHE_S3_NO_CREDENTIALS=0
210+
211+
# Flag to control whether to use pre-built vLLM wheels
212+
ARG VLLM_USE_PRECOMPILED
213+
# TODO: in setup.py VLLM_USE_PRECOMPILED is sensitive to truthiness, it will take =0 as "true", this should be fixed
214+
ENV VLLM_USE_PRECOMPILED=""
215+
RUN if [ "${VLLM_USE_PRECOMPILED}" = "1" ]; then \
216+
export VLLM_USE_PRECOMPILED=1 && \
217+
echo "Using precompiled wheels"; \
218+
else \
219+
unset VLLM_USE_PRECOMPILED && \
220+
echo "Leaving VLLM_USE_PRECOMPILED unset to build wheels from source"; \
221+
fi
222+
210223
# if USE_SCCACHE is set, use sccache to speed up compilation
211224
RUN --mount=type=cache,target=/root/.cache/uv \
212225
--mount=type=bind,source=.git,target=.git \

0 commit comments

Comments
 (0)