This commit is contained in:
parent
e9abf3cb03
commit
f20d301e23
57
Dockerfile
57
Dockerfile
|
|
@ -122,14 +122,6 @@ FROM base AS build
|
|||
RUN curl -L -o sccache.tar.gz https://github.com/mozilla/sccache/releases/download/v0.8.1/sccache-v0.8.1-x86_64-unknown-linux-musl.tar.gz && \
|
||||
tar -xzf sccache.tar.gz && mv sccache-*/sccache /usr/local/bin/sccache && rm -rf sccache*
|
||||
|
||||
|
||||
ENV SCCACHE_DIR=/home/jzy/.cache/sccache
|
||||
ENV SCCACHE_IDLE_TIMEOUT=0
|
||||
ENV RUSTC_WRAPPER=sccache
|
||||
ENV CMAKE_C_COMPILER_LAUNCHER=sccache
|
||||
ENV CMAKE_CXX_COMPILER_LAUNCHER=sccache
|
||||
ENV CMAKE_CUDA_COMPILER_LAUNCHER=sccache
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
|
||||
ARG PIP_INDEX_URL UV_INDEX_URL
|
||||
|
|
@ -158,12 +150,6 @@ ENV MAX_JOBS=${max_jobs}
|
|||
ARG nvcc_threads=8
|
||||
ENV NVCC_THREADS=$nvcc_threads
|
||||
|
||||
ARG USE_SCCACHE
|
||||
ARG SCCACHE_DOWNLOAD_URL=https://github.com/mozilla/sccache/releases/download/v0.8.1/sccache-v0.8.1-x86_64-unknown-linux-musl.tar.gz
|
||||
ARG SCCACHE_ENDPOINT
|
||||
ARG SCCACHE_BUCKET_NAME=vllm-build-sccache
|
||||
ARG SCCACHE_REGION_NAME=us-west-2
|
||||
ARG SCCACHE_S3_NO_CREDENTIALS=0
|
||||
|
||||
# Flag to control whether to use pre-built vLLM wheels
|
||||
ARG VLLM_USE_PRECOMPILED
|
||||
|
|
@ -178,31 +164,24 @@ RUN if [ "${VLLM_USE_PRECOMPILED}" = "1" ]; then \
|
|||
fi
|
||||
|
||||
# if USE_SCCACHE is set, use sccache to speed up compilation
|
||||
# RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
# --mount=type=bind,source=.git,target=.git \
|
||||
# if [ "$USE_SCCACHE" = "1" ]; then \
|
||||
# echo "Installing sccache..." \
|
||||
# && curl -L -o sccache.tar.gz ${SCCACHE_DOWNLOAD_URL} \
|
||||
# && tar -xzf sccache.tar.gz \
|
||||
# && sudo mv sccache-v0.8.1-x86_64-unknown-linux-musl/sccache /usr/bin/sccache \
|
||||
# && rm -rf sccache.tar.gz sccache-v0.8.1-x86_64-unknown-linux-musl \
|
||||
# && if [ ! -z ${SCCACHE_ENDPOINT} ] ; then export SCCACHE_ENDPOINT=${SCCACHE_ENDPOINT} ; fi \
|
||||
# && export SCCACHE_BUCKET=${SCCACHE_BUCKET_NAME} \
|
||||
# && export SCCACHE_REGION=${SCCACHE_REGION_NAME} \
|
||||
# && export SCCACHE_S3_NO_CREDENTIALS=${SCCACHE_S3_NO_CREDENTIALS} \
|
||||
# && export SCCACHE_IDLE_TIMEOUT=0 \
|
||||
# && export CMAKE_BUILD_TYPE=Release \
|
||||
# && sccache --show-stats \
|
||||
# && python3 setup.py bdist_wheel --dist-dir=dist --py-limited-api=cp38 \
|
||||
# && sccache --show-stats; \
|
||||
# fi
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache/sccache \
|
||||
--mount=type=cache,target=/root/.cache/uv \
|
||||
sccache --start-server && \
|
||||
sccache --zero-stats && \
|
||||
python3 setup.py bdist_wheel --dist-dir=dist --py-limited-api=cp38 && \
|
||||
sccache --show-stats
|
||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
--mount=type=bind,source=.git,target=.git \
|
||||
if [ "$USE_SCCACHE" = "1" ]; then \
|
||||
echo "Installing sccache..." \
|
||||
&& curl -L -o sccache.tar.gz ${SCCACHE_DOWNLOAD_URL} \
|
||||
&& tar -xzf sccache.tar.gz \
|
||||
&& sudo mv sccache-v0.8.1-x86_64-unknown-linux-musl/sccache /usr/bin/sccache \
|
||||
&& rm -rf sccache.tar.gz sccache-v0.8.1-x86_64-unknown-linux-musl \
|
||||
&& if [ ! -z ${SCCACHE_ENDPOINT} ] ; then export SCCACHE_ENDPOINT=${SCCACHE_ENDPOINT} ; fi \
|
||||
&& export SCCACHE_BUCKET=${SCCACHE_BUCKET_NAME} \
|
||||
&& export SCCACHE_REGION=${SCCACHE_REGION_NAME} \
|
||||
&& export SCCACHE_S3_NO_CREDENTIALS=${SCCACHE_S3_NO_CREDENTIALS} \
|
||||
&& export SCCACHE_IDLE_TIMEOUT=0 \
|
||||
&& export CMAKE_BUILD_TYPE=Release \
|
||||
&& sccache --show-stats \
|
||||
&& python3 setup.py bdist_wheel --dist-dir=dist --py-limited-api=cp38 \
|
||||
&& sccache --show-stats; \
|
||||
fi
|
||||
|
||||
ENV CCACHE_DIR=/root/.cache/ccache
|
||||
RUN --mount=type=cache,target=/root/.cache/ccache \
|
||||
|
|
|
|||
Loading…
Reference in New Issue