@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / a60883644b
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 4, 13:45 UTC

[Build] Defer flashinfer cubin download to avoid ~2.5 GB (decompressed) layer duplication (#41134)

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>

Benoit Tigeot committed Apr 28, 2026 at 19:27 UTC a60883644be0bcf5219b792b5abbc448e4ea0dcf
1 file changed +8 -3
docker/Dockerfile
+8 -3
@@ -585,9 +585,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
585 ARG FLASHINFER_VERSION=0.6.8.post1
586 RUN --mount=type=cache,target=/root/.cache/uv \
587 uv pip install --system flashinfer-jit-cache==${FLASHINFER_VERSION} \
588 - --extra-index-url https://flashinfer.ai/whl/cu$(echo $CUDA_VERSION | cut -d. -f1,2 | tr -d '.') \
589 - && flashinfer show-config \
590 - && flashinfer download-cubin
588 + --extra-index-url https://flashinfer.ai/whl/cu$(echo $CUDA_VERSION | cut -d. -f1,2 | tr -d '.')
589
590 # ============================================================
591 # OPENAI API SERVER DEPENDENCIES
@@ -669,6 +667,13 @@ RUN --mount=type=bind,from=build,src=/tmp/ep_kernels_workspace/dist,target=/vllm
667 uv pip install --system ep_kernels/dist/*.whl --verbose \
668 --extra-index-url ${PYTORCH_CUDA_INDEX_BASE_URL}/cu$(echo $CUDA_VERSION | cut -d. -f1,2 | tr -d '.')
669
670 +# Download FlashInfer precompiled cubins AFTER all pip installs are done.
671 +# This must run after the vLLM wheel and EP kernels installs above, because
672 +# those can reinstall/touch flashinfer packages. Downloading cubins earlier
673 +# (in the flashinfer-jit-cache layer) causes ~2.5 GB of layer duplication
674 +# when a later pip install overwrites flashinfer package files.
675 +RUN flashinfer show-config && flashinfer download-cubin
676 +
677 # CUDA image changed from /usr/local/nvidia to /usr/local/cuda in 12.8 but will
678 # return to /usr/local/nvidia in 13.0 to allow container providers to mount drivers
679 # consistently from the host (see https://github.com/vllm-project/vllm/issues/18859).