build.sh 927 B

123456789101112131415161718
  1. #!/usr/bin/env bash
  2. # Build for the deepseek-v4-flash-eugr overlay (eugr/spark-vllm-b12x + baked
  3. # instanttensor-hybrid-draft-loader mod). No versions.env — this is a FROM
  4. # overlay on a prebuilt public image, like deepseek-v4-flash-dspark.
  5. set -euo pipefail
  6. cd "$(dirname "$0")"
  7. TAG="${TAG:-eugr/spark-vllm-b12x:sm121}"
  8. echo "=== Building ${TAG} ==="
  9. # Persistent buildkit cache (per node, shared across image dirs): the
  10. # version-independent stages (apt, torch, CUDA base) are reused across
  11. # rebuilds — only the pinned source stages (vllm/b12x/…) re-download and
  12. # re-compile. Override the dir with SM121_BUILDKIT_CACHE if desired.
  13. CACHE_DIR="${SM121_BUILDKIT_CACHE:-$HOME/.cache/sm121-buildkit}"
  14. mkdir -p "${CACHE_DIR}"
  15. docker buildx build --cache-from "type=local,src=${CACHE_DIR}" \
  16. --cache-to "type=local,dest=${CACHE_DIR},mode=max" \
  17. --progress=plain --load -t "${TAG}" . 2>&1
  18. echo "=== Done: ${TAG} ==="