| 1234567891011121314151617181920212223242526272829 |
- #!/usr/bin/env bash
- # Build the dsv41-flash B12X wrapper (thin FROM over the sm121-built base).
- #
- # Uses the classic docker builder (not buildx docker-container): the base
- # image dsv41-flash:local is local-only (never pushed to a registry), and
- # the container-driver builder cannot resolve local FROM references.
- #
- # Generic driver: forwards every KEY=VAL pin in versions.env as a
- # --build-arg to the Dockerfile (no hardcoded variable list). The sm121
- # launcher writes a merged versions.env here when a recipe carries
- # [build.versions] overrides (recipe wins over the image defaults).
- set -euo pipefail
- cd "$(dirname "$0")"
- TAG="${TAG:-dsv41-sglang-1017:local}"
- ARGS=()
- while IFS= read -r line; do
- # Skip blank lines and comments (# ...).
- case "$line" in
- ''|\#*) continue ;;
- esac
- key="${line%%=*}"
- val="${line#*=}"
- [ -n "$key" ] && ARGS+=(--build-arg "${key}=${val}")
- done < versions.env
- echo "=== Building ${TAG} ==="
- docker build "${ARGS[@]}" --progress=plain -t "${TAG}" -f Dockerfile . 2>&1
- echo "=== Done: ${TAG} ==="
|