From e3e31e54b05391d21a4b492d3bde612f47696975 Mon Sep 17 00:00:00 2001 From: "Kevin H. Luu" Date: Fri, 12 Jun 2026 14:51:45 -0700 Subject: [PATCH] [Bugfix][CPU] Don't build triton-cpu on arm64 release image (#45401) Signed-off-by: khluu --- docker/Dockerfile.cpu | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docker/Dockerfile.cpu b/docker/Dockerfile.cpu index 4df401395f..61bad68b44 100644 --- a/docker/Dockerfile.cpu +++ b/docker/Dockerfile.cpu @@ -168,6 +168,12 @@ RUN --mount=type=cache,target=/root/.cache/uv \ ######################### TRITON-CPU BUILD IMAGE ######################### FROM base AS vllm-triton-cpu-build +# Support for cross-compilation with x86 ISA including AVX2 and AVX512: docker build --build-arg VLLM_CPU_X86="true" ... +# Re-declared here because this stage is `FROM base` (not `vllm-build`), so it +# does not inherit the ARG/ENV defined there. Without it, the guard below would +# see an empty value and build triton-cpu on non-x86 targets (e.g. arm64). +ARG VLLM_CPU_X86=0 + WORKDIR /vllm-workspace RUN mkdir dist @@ -269,6 +275,11 @@ ENV HF_HUB_DOWNLOAD_TIMEOUT 60 ######################### RELEASE IMAGE ######################### FROM base AS vllm-openai +# Re-declared here because this stage is `FROM base` (not `vllm-build`), so the +# RUN below that gates the triton-cpu wheel install on $VLLM_CPU_X86 would +# otherwise see an empty value and try to install it on non-x86 targets. +ARG VLLM_CPU_X86=0 + WORKDIR /vllm-workspace RUN --mount=type=cache,target=/root/.cache/uv \