diff --git a/scripts/ci/cuda/ci_install_dependency.sh b/scripts/ci/cuda/ci_install_dependency.sh index d53e52c0b676..66a37310de77 100755 --- a/scripts/ci/cuda/ci_install_dependency.sh +++ b/scripts/ci/cuda/ci_install_dependency.sh @@ -285,11 +285,15 @@ install_sglang_kernel() { $PIP_CMD install "torch==${TORCH_VER}" "torchaudio==${TORCHAUDIO_VER}" "torchvision==${TORCHVISION_VER}" --index-url "https://download.pytorch.org/whl/${CU_VERSION}" --force-reinstall --no-deps $PIP_INSTALL_SUFFIX fi - # install_sglang above pulls sglang-kernel from PyPI, whose default wheel - # tracks one CUDA version (currently cu130). Force-reinstall from the - # CU_VERSION-matched sglang wheel index so runners on a different CUDA - # (e.g. h20 / cu129) get a wheel linked against the right libnvrtc. - $PIP_CMD install "sglang-kernel==${SGL_KERNEL_VERSION_FROM_SRT}" --index-url "https://docs.sglang.ai/whl/${CU_VERSION}/" --force-reinstall --no-deps $PIP_INSTALL_SUFFIX + if [ "${CUSTOM_BUILD_SGL_KERNEL:-}" != "true" ]; then + # install_sglang above pulls sglang-kernel from PyPI, whose default wheel + # tracks one CUDA version (currently cu130). Force-reinstall from the + # CU_VERSION-matched sglang wheel index so runners on a different CUDA + # (e.g. h20 / cu129) get a wheel linked against the right libnvrtc. + $PIP_CMD install "sglang-kernel==${SGL_KERNEL_VERSION_FROM_SRT}" --index-url "https://docs.sglang.ai/whl/${CU_VERSION}/" --force-reinstall --no-deps $PIP_INSTALL_SUFFIX + else + echo "CUSTOM_BUILD_SGL_KERNEL=true: keeping freshly built sgl-kernel wheel." + fi mark_step_done "${FUNCNAME[0]}" }