From 80389fec004394db409e9d04aef263465a3b235c Mon Sep 17 00:00:00 2001 From: Michael <13900043+michaelzhang-ai@users.noreply.github.com> Date: Wed, 25 Mar 2026 19:18:19 -0700 Subject: [PATCH] [AMD] Fix AMD CI: mark /sglang-checkout as git safe.directory in container (#21423) Co-authored-by: Bingxu Chen --- scripts/ci/amd/amd_ci_start_container.sh | 5 +++++ scripts/ci/amd/amd_ci_start_container_disagg.sh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/scripts/ci/amd/amd_ci_start_container.sh b/scripts/ci/amd/amd_ci_start_container.sh index 721a3e5dc..327da9348 100755 --- a/scripts/ci/amd/amd_ci_start_container.sh +++ b/scripts/ci/amd/amd_ci_start_container.sh @@ -241,3 +241,8 @@ docker run -dt --user root --device=/dev/kfd ${DEVICE_FLAG} \ -w /sglang-checkout \ --name ci_sglang \ "${IMAGE}" + +# The checkout is owned by the runner (non-root) but the container runs as +# root. Git >= 2.35.2 rejects cross-user repos; mark the mount as safe so +# setuptools-scm / vcs_versioning can resolve the package version. +docker exec ci_sglang git config --global --add safe.directory /sglang-checkout diff --git a/scripts/ci/amd/amd_ci_start_container_disagg.sh b/scripts/ci/amd/amd_ci_start_container_disagg.sh index 70de85dff..6ae28f82b 100755 --- a/scripts/ci/amd/amd_ci_start_container_disagg.sh +++ b/scripts/ci/amd/amd_ci_start_container_disagg.sh @@ -263,3 +263,8 @@ docker run -dt --user root \ -w /sglang-checkout \ --name ci_sglang \ "${IMAGE}" + +# The checkout is owned by the runner (non-root) but the container runs as +# root. Git >= 2.35.2 rejects cross-user repos; mark the mount as safe so +# setuptools-scm / vcs_versioning can resolve the package version. +docker exec ci_sglang git config --global --add safe.directory /sglang-checkout