diff --git a/docker/Dockerfile b/docker/Dockerfile index 709b79e84fbb..38ec5dfc885f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -225,12 +225,12 @@ RUN --mount=type=cache,target=/root/.cache/ccache \ fi # Check the size of the wheel if RUN_WHEEL_CHECK is true -COPY .buildkite/check-wheel-size.py check-wheel-size.py # sync the default value with .buildkite/check-wheel-size.py ARG VLLM_MAX_SIZE_MB=500 ENV VLLM_MAX_SIZE_MB=$VLLM_MAX_SIZE_MB ARG RUN_WHEEL_CHECK=true -RUN if [ "$RUN_WHEEL_CHECK" = "true" ]; then \ +RUN --mount=type=bind,source=.buildkite/check-wheel-size.py,target=check-wheel-size.py \ + if [ "$RUN_WHEEL_CHECK" = "true" ]; then \ python3 check-wheel-size.py dist; \ else \ echo "Skipping wheel size check."; \ @@ -367,24 +367,23 @@ RUN --mount=type=cache,target=/root/.cache/uv \ # Install DeepGEMM from source ARG DEEPGEMM_GIT_REF -COPY tools/install_deepgemm.sh /tmp/install_deepgemm.sh -RUN --mount=type=cache,target=/root/.cache/uv \ +RUN --mount=type=bind,source=tools/install_deepgemm.sh,target=/tmp/install_deepgemm.sh \ + --mount=type=cache,target=/root/.cache/uv \ VLLM_DOCKER_BUILD_CONTEXT=1 TORCH_CUDA_ARCH_LIST="9.0a 10.0a" /tmp/install_deepgemm.sh --cuda-version "${CUDA_VERSION}" ${DEEPGEMM_GIT_REF:+--ref "$DEEPGEMM_GIT_REF"} -COPY tools/install_gdrcopy.sh install_gdrcopy.sh -RUN set -eux; \ +RUN --mount=type=bind,source=tools/install_gdrcopy.sh,target=install_gdrcopy.sh \ + set -eux; \ case "${TARGETPLATFORM}" in \ linux/arm64) UUARCH="aarch64" ;; \ linux/amd64) UUARCH="x64" ;; \ *) echo "Unsupported TARGETPLATFORM: ${TARGETPLATFORM}" >&2; exit 1 ;; \ esac; \ - ./install_gdrcopy.sh "${GDRCOPY_OS_VERSION}" "${GDRCOPY_CUDA_VERSION}" "${UUARCH}"; \ - rm ./install_gdrcopy.sh + ./install_gdrcopy.sh "${GDRCOPY_OS_VERSION}" "${GDRCOPY_CUDA_VERSION}" "${UUARCH}"; # Install EP kernels(pplx-kernels and DeepEP) -COPY tools/ep_kernels/install_python_libraries.sh install_python_libraries.sh ENV CUDA_HOME=/usr/local/cuda -RUN export TORCH_CUDA_ARCH_LIST="${TORCH_CUDA_ARCH_LIST:-9.0a 10.0a+PTX}" \ +RUN --mount=type=bind,source=tools/ep_kernels/install_python_libraries.sh,target=install_python_libraries.sh \ + export TORCH_CUDA_ARCH_LIST="${TORCH_CUDA_ARCH_LIST:-9.0a 10.0a+PTX}" \ && bash install_python_libraries.sh # CUDA image changed from /usr/local/nvidia to /usr/local/cuda in 12.8 but will