diff --git a/scripts/ci/cuda/ci_install_dependency.sh b/scripts/ci/cuda/ci_install_dependency.sh index bd0f6b650494..1a595fbb14fd 100755 --- a/scripts/ci/cuda/ci_install_dependency.sh +++ b/scripts/ci/cuda/ci_install_dependency.sh @@ -370,11 +370,22 @@ stabilize_flashinfer_jit_paths() { install_extra_deps() { if [ "$CU_MAJOR" = "13" ]; then MOONCAKE_PKG="mooncake-transfer-engine-cuda13==0.3.10.post2" + MOONCAKE_STALE_PKG="mooncake-transfer-engine" EXTRA_NVIDIA_SPECS="nvidia-cuda-nvrtc" else MOONCAKE_PKG="mooncake-transfer-engine==0.3.10.post2" + MOONCAKE_STALE_PKG="mooncake-transfer-engine-cuda13" EXTRA_NVIDIA_SPECS="nvidia-cuda-nvrtc-cu12" fi + # Both variants own the same mooncake/ package files and bin/ scripts + # (mooncake_master, etc.). Uninstalling the stale variant deletes shared + # files that the live variant's RECORD still references, so we force a + # reinstall to restore them — pip would otherwise see "already satisfied" + # and skip. + if pip show ${MOONCAKE_STALE_PKG} >/dev/null 2>&1; then + $PIP_UNINSTALL_CMD ${MOONCAKE_STALE_PKG} $PIP_UNINSTALL_SUFFIX || true + $PIP_CMD install ${MOONCAKE_PKG} --force-reinstall --no-deps $PIP_INSTALL_SUFFIX + fi $PIP_CMD install ${MOONCAKE_PKG} ${EXTRA_NVIDIA_SPECS} py-spy scipy huggingface_hub[hf_xet] pytest $PIP_INSTALL_SUFFIX if [ "$IS_BLACKWELL" != "1" ]; then