| 1234567891011121314151617181920212223 |
- #!/usr/bin/env bash
- # Build the SM121 GLM-5.3-Flash DFlash2 image: lab image + DFlash2 draft-model
- # port from local-inference-lab/vllm dev/jovian-judgement (see UPSTREAM.md).
- #
- # 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-dflash2:local bash build.sh).
- set -euo pipefail
- cd "$(dirname "$0")"
- TAG="${TAG:-glm53-flash-dflash2:local}"
- ARGS=()
- while IFS= read -r line; do
- case "$line" in
- ''|\#*) continue ;;
- esac
- key="${line%%=*}"; val="${line#*=}"
- [ -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} ==="
|