Fix: add --no-build-isolation to pip wheel for flash-attention

Without this flag, pip runs the build in an isolated environment
that doesn't have access to torch in the venv.
This commit is contained in:
2026-04-02 20:55:32 +00:00
parent 82b2ceacd5
commit 14467bef70

View File

@@ -122,7 +122,7 @@ RUN apt-get update && apt-get install -y build-essential cmake gcc && \
FLASH_ATTENTION_FORCE_BUILD="TRUE" \ FLASH_ATTENTION_FORCE_BUILD="TRUE" \
FLASH_ATTENTION_FORCE_CXX11_ABI="FALSE" \ FLASH_ATTENTION_FORCE_CXX11_ABI="FALSE" \
FLASH_ATTENTION_SKIP_CUDA_BUILD="FALSE" \ FLASH_ATTENTION_SKIP_CUDA_BUILD="FALSE" \
pip wheel . -v --no-deps -w ./wheels/ && \ pip wheel . -v --no-deps --no-build-isolation -w ./wheels/ && \
cp wheels/*.whl /wheels/ cp wheels/*.whl /wheels/
FROM build-base AS build-vllm FROM build-base AS build-vllm