build.sh 850 B

12345678910111213141516171819202122232425
  1. #!/usr/bin/env bash
  2. # Build the MiMo-V2.6-Pro-RL 8x Spark image (SGLang dev-cu13 + 12 patches).
  3. #
  4. # Generic driver: forwards every KEY=VAL pin in versions.env as a
  5. # --build-arg to the Dockerfile (no hardcoded variable list). The sm121
  6. # launcher writes a merged versions.env here when a recipe carries
  7. # [build.versions] overrides (recipe wins over the image defaults).
  8. set -euo pipefail
  9. cd "$(dirname "$0")"
  10. TAG="${TAG:-mimo26-spark:a14}"
  11. ARGS=()
  12. while IFS= read -r line; do
  13. # Skip blank lines and comments (# ...).
  14. case "$line" in
  15. ''|\#*) continue ;;
  16. esac
  17. key="${line%%=*}"
  18. val="${line#*=}"
  19. [ -n "$key" ] && ARGS+=(--build-arg "${key}=${val}")
  20. done < versions.env
  21. echo "=== Building ${TAG} ==="
  22. docker buildx build "${ARGS[@]}" --progress=plain --load -t "${TAG}" -f Dockerfile . 2>&1
  23. echo "=== Done: ${TAG} ==="