From b9598185368c237ab9b770a6541b1cb8c7b739ab Mon Sep 17 00:00:00 2001 From: Eugene Rakhmatulin Date: Wed, 18 Feb 2026 16:53:57 -0800 Subject: [PATCH] MXFP4 fix cache bug --- Dockerfile.mxfp4 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile.mxfp4 b/Dockerfile.mxfp4 index 8b863f2..a1b03f7 100644 --- a/Dockerfile.mxfp4 +++ b/Dockerfile.mxfp4 @@ -109,13 +109,13 @@ RUN --mount=type=cache,id=git-flashinfer,target=/git-cache/flashinfer \ echo "=== Using cached FlashInfer repo ===" && \ cp -a /git-cache/flashinfer /workspace/flashinfer && \ cd /workspace/flashinfer && \ - git fetch origin; \ + git fetch origin && git fetch origin --tags; \ else \ echo "=== Cloning FlashInfer (first build) ===" && \ git clone ${FLASHINFER_REPO} /workspace/flashinfer && \ cp -a /workspace/flashinfer /git-cache/flashinfer; \ fi && \ - cd /workspace/flashinfer && git checkout ${FLASHINFER_SHA} + cd /workspace/flashinfer && (git checkout --detach origin/${FLASHINFER_SHA} 2>/dev/null || git checkout ${FLASHINFER_SHA}) # Clone spdlog submodule (small, no caching needed) RUN cd /workspace/flashinfer && \ @@ -129,14 +129,14 @@ RUN --mount=type=cache,id=git-cutlass,target=/git-cache/cutlass \ echo "=== Using cached CUTLASS repo ===" && \ cp -a /git-cache/cutlass 3rdparty/cutlass && \ cd 3rdparty/cutlass && \ - git fetch origin; \ + git fetch origin && git fetch origin --tags; \ else \ echo "=== Cloning CUTLASS (first build) ===" && \ rm -rf /git-cache/cutlass/* /git-cache/cutlass/.* 2>/dev/null || true && \ git clone ${CUTLASS_REPO} 3rdparty/cutlass && \ cp -a /workspace/flashinfer/3rdparty/cutlass/. /git-cache/cutlass/; \ fi && \ - cd /workspace/flashinfer/3rdparty/cutlass && git checkout ${CUTLASS_SHA} + cd /workspace/flashinfer/3rdparty/cutlass && (git checkout --detach origin/${CUTLASS_SHA} 2>/dev/null || git checkout ${CUTLASS_SHA}) # Build FlashInfer wheels