build.sh 935 B

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env bash
  2. # Build Solar Open2 250B NVFP4 (Nota) Docker image for DGX Spark (aarch64/sm_121a).
  3. # All build inputs are version-pinned in versions.env and locks/.
  4. #
  5. # Generic driver: forwards every KEY=VAL pin in versions.env as a
  6. # --build-arg to the Dockerfile (no hardcoded variable list). The sm121
  7. # launcher writes a merged versions.env here when a recipe carries
  8. # [build.versions] overrides (recipe wins over the image defaults).
  9. set -euo pipefail
  10. cd "$(dirname "$0")"
  11. TAG="${TAG:-solar-open2-nvfp4:probe}"
  12. ARGS=()
  13. while IFS= read -r line; do
  14. # Skip blank lines and comments (# ...).
  15. case "$line" in
  16. ''|\#*) continue ;;
  17. esac
  18. key="${line%%=*}"
  19. val="${line#*=}"
  20. [ -n "$key" ] && ARGS+=(--build-arg "${key}=${val}")
  21. done < versions.env
  22. echo "=== Building ${TAG} ==="
  23. DOCKER_BUILDKIT=1 docker build "${ARGS[@]}" --progress=plain -t "${TAG}" -f Dockerfile . 2>&1
  24. echo "=== Done: ${TAG} ==="