Skip to content

Commit a33ea28

Browse files
authored
Add flashinfer_python to CUDA wheel requirements (#21389)
Signed-off-by: mgoin <[email protected]>
1 parent 7b49cb1 commit a33ea28

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

docker/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,8 @@ RUN --mount=type=bind,from=build,src=/workspace/dist,target=/vllm-workspace/dist
386386

387387
# Install FlashInfer from source
388388
ARG FLASHINFER_GIT_REPO="https://github.com/flashinfer-ai/flashinfer.git"
389+
# Keep this in sync with https://github.com/vllm-project/vllm/blob/main/requirements/cuda.txt
390+
# We use `--force-reinstall --no-deps` to avoid issues with the existing FlashInfer wheel.
389391
ARG FLASHINFER_GIT_REF="v0.2.9rc2"
390392
RUN --mount=type=cache,target=/root/.cache/uv bash - <<'BASH'
391393
. /etc/environment
@@ -408,7 +410,7 @@ RUN --mount=type=cache,target=/root/.cache/uv bash - <<'BASH'
408410
TORCH_CUDA_ARCH_LIST="${FI_TORCH_CUDA_ARCH_LIST}" \
409411
python3 -m flashinfer.aot
410412
TORCH_CUDA_ARCH_LIST="${FI_TORCH_CUDA_ARCH_LIST}" \
411-
uv pip install --system --no-build-isolation .
413+
uv pip install --system --no-build-isolation --force-reinstall --no-deps .
412414
popd
413415
rm -rf flashinfer
414416
BASH

requirements/cuda.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ torchaudio==2.7.1
1212
torchvision==0.22.1 # Required for phi3v processor. See https://github.com/pytorch/vision?tab=readme-ov-file#installation for corresponding version
1313
# https://github.com/facebookresearch/xformers/releases/tag/v0.0.31
1414
xformers==0.0.31; platform_system == 'Linux' and platform_machine == 'x86_64' # Requires PyTorch >= 2.7
15+
# FlashInfer should be updated together with the Dockerfile
16+
flashinfer_python==0.2.9rc2

0 commit comments

Comments
 (0)