Fix wheel install conflict, use python -m build instead of pip build

This commit is contained in:
2026-04-03 08:52:43 +00:00
parent ce55e45db2
commit 4e8a765c72
2 changed files with 6 additions and 5 deletions

View File

@@ -38,7 +38,7 @@ ENV LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
FROM base AS build-base
# Install build tools and dependencies
RUN pip install -U build cmake ninja pybind11 "setuptools>=77.0.3,<81.0.0" wheel
RUN pip install -U build cmake ninja pybind11 "setuptools>=77.0.3,<81.0.0"
# Clone the repo, apply the patch, and build
RUN git clone https://github.com/LMCache/LMCache.git && \

View File

@@ -50,7 +50,8 @@ RUN mkdir /wheels
# Install build deps that aren't in project requirements files
# Pin setuptools to <81 for LMCache compatibility (needs >=77.0.3,<81.0.0)
RUN pip install -U build cmake ninja pybind11 "setuptools>=77.0.3,<81.0.0" wheel
# Note: wheel is already installed in NGC container, don't try to upgrade it
RUN pip install -U build cmake ninja pybind11 "setuptools>=77.0.3,<81.0.0"
# Use PyPI triton wheel instead of building (QEMU segfaults during triton build)
FROM build-base AS build-triton
@@ -76,7 +77,7 @@ RUN cd flashinfer && \
git checkout ${FLASHINFER_REF} && \
git submodule sync && \
git submodule update --init --recursive -j 8 && \
pip build --wheel --no-build-isolation -o /wheels
python -m build --wheel --no-build-isolation -o /wheels
FROM build-base AS build-lmcache
# Bleeding edge: build from dev branch (v0.4.2+)
@@ -136,7 +137,7 @@ RUN cd vllm && \
export CMAKE_BUILD_PARALLEL_LEVEL=$MAX_JOBS && \
python use_existing_torch.py && \
pip install -r requirements/build.txt && \
CCACHE_NOHASHDIR="true" pip build --wheel --no-build-isolation -o /wheels
CCACHE_NOHASHDIR="true" python -m build --wheel --no-build-isolation -o /wheels
# Build infinistore after vllm to avoid cache invalidation
FROM build-base AS build-infinistore
@@ -182,7 +183,7 @@ RUN pip install accelerate hf_transfer modelscope bitsandbytes timm boto3 runai-
RUN pip cache purge || true
# Install build tools and dependencies
RUN pip install -U build cmake ninja pybind11 setuptools==79.0.1 wheel
RUN pip install -U build cmake ninja pybind11 setuptools==79.0.1
# Enable hf-transfer
ENV HF_HUB_ENABLE_HF_TRANSFER=1