From bf6f0ceb6665e4034ca6e4f32ce77a1e4b70dc4c Mon Sep 17 00:00:00 2001 From: Zhewen Li Date: Fri, 29 May 2026 19:07:32 -0700 Subject: [PATCH] Revert "[Bugfix][CPU] Remove invalid extra deps (#43977)" This reverts commit 3f6f508e14b7c5325b74cf1ab541c9330611b9a2. --- docker/Dockerfile.cpu | 26 +------------------------- setup.py | 5 +++++ 2 files changed, 6 insertions(+), 25 deletions(-) diff --git a/docker/Dockerfile.cpu b/docker/Dockerfile.cpu index e185c00cb2fa..c2ce0e88f296 100644 --- a/docker/Dockerfile.cpu +++ b/docker/Dockerfile.cpu @@ -165,23 +165,6 @@ RUN --mount=type=cache,target=/root/.cache/uv \ --mount=type=cache,target=/vllm-workspace/.deps,sharing=locked \ VLLM_TARGET_DEVICE=cpu python3 setup.py bdist_wheel --dist-dir=dist --py-limited-api=cp38 -######################### TRITON-CPU BUILD IMAGE ######################### -FROM base AS vllm-triton-cpu-build - -WORKDIR /vllm-workspace - -RUN mkdir dist - -RUN --mount=type=cache,target=/root/.cache/uv \ - --mount=type=cache,target=/root/.cache/ccache \ - --mount=type=cache,target=/vllm-workspace/.deps,sharing=locked \ - if [ "$TARGETARCH" = "amd64" ] || [ "$VLLM_CPU_X86" != "0" ]; then \ - git clone --recurse-submodules "https://github.com/triton-lang/triton-cpu.git"; \ - cd triton-cpu; \ - git checkout "270e696d"; \ - uv build --wheel --out-dir=../dist; \ - fi - ######################### TEST DEPS ######################### FROM base AS vllm-test-deps @@ -274,14 +257,7 @@ WORKDIR /vllm-workspace RUN --mount=type=cache,target=/root/.cache/uv \ --mount=type=cache,target=/root/.cache/ccache \ --mount=type=bind,from=vllm-build,src=/vllm-workspace/dist,target=dist \ - uv pip install "$(realpath dist/*.whl)[audio]" - -RUN --mount=type=cache,target=/root/.cache/uv \ - --mount=type=cache,target=/root/.cache/ccache \ - --mount=type=bind,from=vllm-triton-cpu-build,src=/vllm-workspace/dist,target=dist \ - if [ "$TARGETARCH" = "amd64" ] || [ "$VLLM_CPU_X86" != "0" ]; then \ - uv pip install "$(realpath dist/*.whl)"; \ - fi + uv pip install "$(realpath dist/*.whl)[audio,triton-cpu]" # Add labels to document build configuration LABEL org.opencontainers.image.title="vLLM CPU" diff --git a/setup.py b/setup.py index 3221c1d1bc0e..a95ee3451b58 100644 --- a/setup.py +++ b/setup.py @@ -1195,6 +1195,11 @@ def _read_requirements(filename: str) -> list[str]: "opentelemetry-exporter-otlp>=1.26.0", "opentelemetry-semantic-conventions-ai>=0.4.1", ], + "triton-cpu": [ + "triton @ " + "git+https://github.com/triton-lang/triton-cpu.git@270e696d ; " + "platform_machine == 'x86_64'", + ], # Remove after stable release }, cmdclass=cmdclass, package_data=package_data,