-
Notifications
You must be signed in to change notification settings - Fork 0
cicd pipeline
Bibo Hao edited this page Jul 2, 2026
·
1 revision
This module covers the automation scripts, GitHub Action workflow definitions, and cross-registry image synchronization tooling of the LabNow Docker ecosystem.
Located at the repository root, tool.sh coordinates local and automated builds. It configures registries, tags, and helper functions.
The script determines the registry namespace and tags dynamically based on the current Git branch:
-
CI_PROJECT_BRANCH: Defaults to$GITHUB_HEAD_REFor fallback to"main". -
NAMESPACE_SUFFIX:- If the branch is
main, the suffix is empty:"". - Otherwise, it is formatted as:
"0" + {first segment of branch before "/"}(e.g.feat/add-login-> suffix is0feat).
- If the branch is
-
CI_PROJECT_NAMESPACE: Concatenates project namespace with the branch suffix (e.g.LabNow-ai->LabNow-ai0feat). -
TAG_SUFFIX: Short hash suffix-$(git rev-parse --short HEAD).
-
build_image <img_name> <tag> <dockerfile_path> [build-args]: Builds the image using--compress --force-rm=true. It tags the output as${REGISTRY_DST}/${IMG_NAMESPACE}/${img_name}:${tag}and creates a timestamped versionY.m.d.HM${TAG_SUFFIX}. -
build_image_no_tag: Builds the image without adding the timestamped version tag (typically used for intermediate build stages). -
alias_image <img1> <tag1> <img2> <tag2>: Retags a compiled local image to another repository name or alias. -
push_image [keyword]: Logs into the destination registry via stdin, selects local images matching[keyword], and pushes them. -
clear_images: Clears historical local images to prevent Docker daemon disk starvation.
Automated builds are split into two workflows located under .github/workflows/:
-
Trigger: Pushes or PRs targeting
mainbranch (ignoring changes solely in markdown files). -
Jobs:
-
job-base: Compiles the coreatomandbaseimages. -
job-python/job-core/job-py-std/job-node/job-rust/job-jdketc.: Depend onjob-baseand run concurrently to build their specific language environments. -
job-docker_kit: Builds thedocker-kitimage containingimage-syncer. -
sync_images: Runs final registry migrations once dependencies are ready.
-
- Trigger: Same trigger conditions.
-
Jobs:
-
job-cuda_128/job-cuda_126: Compiles CUDA-specific atom wrappers, builds conda-base wrappers, and builds final cuda base images. -
job-torch_cuda128/job-tf2/job-paddle_cuda126etc.: Depend on the respective CUDA jobs and compile python profiles for Deep Learning stacks. -
job-core-cuda: Builds the full stack CUDA environment.
-
Built using docker_docker_kit/docker-kit.Dockerfile, the docker-kit image packages the tools required to mirror built images across registries.
-
yq: Installed viasetup_yqfor YAML files processing. -
Docker Compose: Sourced from
script-setup-docker.sh->setup_docker_compose. -
image-syncer: Sourced from
setup_docker_syncerand mapped to/opt/utils/image-syncer/.
-
run_jobs.py: A python script that reads registry authentication credentials fromauth.json, parses workflow files to identify target images, and starts mirroring processes. -
run_sync.py: Executes parallelimage-syncershell invocations to migrate images from the primary destination registry to secondary mirror registries (e.g. Quay.io to regional mirrors).