Skip to content

ci(docker): shallow-clone build-time git deps to cut build-docker time - #1000

Open
WangLingxun wants to merge 1 commit into
mainfrom
ci/shallow-clone-docker-deps
Open

ci(docker): shallow-clone build-time git deps to cut build-docker time#1000
WangLingxun wants to merge 1 commit into
mainfrom
ci/shallow-clone-docker-deps

Conversation

@WangLingxun

@WangLingxun WangLingxun commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • aiter, Primus-Turbo, triton, uccl in .github/workflows/docker/Dockerfile were full-history git clones, and their pinned submodules (composable_kernel, hipify_torch) were fetched via git submodule update --init --recursive with no depth limit — observed taking 30-45min on their own on a slow outbound link.
  • Switch main-repo clones that checkout an arbitrary pinned SHA to partial clone (--filter=blob:none): keeps the full commit graph (so any SHA is still reachable) but defers blob content until checkout.
  • Switch submodule updates (pinned to exact SHAs) to --depth 1 --filter=blob:none: GitHub allows shallow-fetching an arbitrary reachable SHA, so this skips the submodule's full history entirely.
  • rccl / amd-anp in Dockerfile.ainic checkout fixed tags, so those go straight to git clone --branch <tag> --single-branch --depth 1.
  • Same submodule fix applied to the run-unittest-jax job's "Init Primus-Turbo submodules" step in ci.yaml.

Test plan

  • Trigger build-docker on a PR and compare wall-clock time against a recent run on the same runner
  • Confirm the built image still resolves to the exact pinned commits/tags for aiter, Primus-Turbo, triton, uccl, rccl, amd-anp

aiter, Primus-Turbo, triton and uccl were full-history cloned, and their
pinned submodules (e.g. composable_kernel) were fetched without --depth,
turning a single git clone into 30-45min on a slow link. Use partial
clone (--filter=blob:none) for repos checked out by SHA, and shallow
clone/submodule update for repos/submodules pinned to a tag or exact SHA.
@WangLingxun
WangLingxun marked this pull request as ready for review August 20, 2026 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant