| 123456789101112131415161718192021222324 |
- #!/usr/bin/env bash
- # Build the SM121 GLM-5.3-Flash NVFP4 (lab quant) image: day-0 base +
- # NoPE-MLA mod + FujitsuPolycom lab-checkpoint patches.
- #
- # Generic driver: forwards every KEY=VAL pin in versions.env as a --build-arg
- # to the Dockerfile. TAG is set by the sm121 launcher to the recipe's
- # docker_image (manual build: TAG=glm53-flash-nvfp4-lab:local bash build.sh).
- set -euo pipefail
- cd "$(dirname "$0")"
- TAG="${TAG:-glm53-flash-nvfp4-lab:local}"
- ARGS=()
- while IFS= read -r line; do
- case "$line" in
- ''|\#*) continue ;;
- esac
- key="${line%%=*}"; val="${line#*=}"
- val="${val%\"}"; val="${val#\"}" # versions.env values may be shell-quoted
- [ -n "$key" ] && ARGS+=(--build-arg "${key}=${val}")
- done < versions.env
- echo "=== Building ${TAG} ==="
- DOCKER_BUILDKIT=1 docker build "${ARGS[@]}" --progress=plain -t "${TAG}" -f Dockerfile . 2>&1
- echo "=== Done: ${TAG} ==="
|