| 123456789101112131415161718192021222324252627 |
- #!/usr/bin/env bash
- # Build the Mistral Large 4 NVFP4 vLLM image for DGX Spark (aarch64).
- #
- # 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:-mistral-large4-vllm: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} ==="
- # No buildkit cache mount needed: a single FROM stage, no compile.
- docker buildx build "${ARGS[@]}" \
- --progress=plain --load -t "${TAG}" -f Dockerfile . 2>&1
- echo "=== Done: ${TAG} ==="
|