build.sh 1.1 KB

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env bash
  2. # Build the Nemotron-3.5-Bolt B12X wrapper (thin FROM over the model card's
  3. # pinned stock vLLM nightly).
  4. #
  5. # Uses the classic docker builder (not buildx docker-container): the base is a
  6. # registry image pulled by digest, which the classic builder resolves fine, and
  7. # this keeps the build identical to the other b12x wrappers in this repo.
  8. #
  9. # Generic driver: forwards every KEY=VAL pin in versions.env as a
  10. # --build-arg to the Dockerfile (no hardcoded variable list). The sm121
  11. # launcher writes a merged versions.env here when a recipe carries
  12. # [build.versions] overrides (recipe wins over the image defaults).
  13. set -euo pipefail
  14. cd "$(dirname "$0")"
  15. TAG="${TAG:-nemotron-bolt-b12x:local}"
  16. ARGS=()
  17. while IFS= read -r line; do
  18. # Skip blank lines and comments (# ...).
  19. case "$line" in
  20. ''|\#*) continue ;;
  21. esac
  22. key="${line%%=*}"
  23. val="${line#*=}"
  24. [ -n "$key" ] && ARGS+=(--build-arg "${key}=${val}")
  25. done < versions.env
  26. echo "=== Building ${TAG} ==="
  27. docker build "${ARGS[@]}" --progress=plain -t "${TAG}" -f Dockerfile . 2>&1
  28. echo "=== Done: ${TAG} ==="