[CI][Build] Harden triton-cpu sleef submodule fetch in CPU image build (#57871)

Signed-off-by: kimi-no-na-wa <kimi-no-na-wa@users.noreply.github.com> Co-authored-by: kimi-no-na-wa <kimi-no-na-wa@users.noreply.github.com>

vllm-agent committed Sep 21, 2026 at 15:30 UTC 8644d2af2fb7c4588190a8d7f6c26a3cbef78a0f
1 file changed +6
docker/Dockerfile.cpu
+6
@@ -140,6 +140,12 @@ RUN --mount=type=cache,target=/root/.cache/uv \
140 git clone --recurse-submodules --shallow-submodules --filter=blob:none "https://github.com/triton-lang/triton-cpu.git"; \
141 cd triton-cpu; \
142 git checkout "270e696d"; \
143 + if [ ! -f third_party/sleef/CMakeLists.txt ]; then \
144 + echo "sleef submodule empty after shallow fetch; retrying unshallow"; \
145 + git submodule foreach --recursive 'git fetch --unshallow origin || true'; \
146 + git submodule update --init --recursive --force; \
147 + fi; \
148 + test -f third_party/sleef/CMakeLists.txt || { echo "FATAL: sleef submodule unavailable"; exit 1; }; \
149 if [ "$USE_SCCACHE" = "1" ]; then \
150 if [ "$SCCACHE_LOCAL_ONLY" = "1" ]; then \
151 unset SCCACHE_BUCKET SCCACHE_REGION; \