|
@@ -0,0 +1,15 @@
|
|
|
|
|
+#!/usr/bin/env bash
|
|
|
|
|
+set -euo pipefail
|
|
|
|
|
+cd "$(dirname "$0")"
|
|
|
|
|
+TAG="${TAG:-sparkrun-vllm-glm53-flash-aiden:glm53}"
|
|
|
|
|
+echo "=== Building ${TAG} ==="
|
|
|
|
|
+# Persistent buildkit cache (per node, shared across image dirs): the
|
|
|
|
|
+# version-independent stages (apt, torch, CUDA base) are reused across
|
|
|
|
|
+# rebuilds — only the pinned source stages (vllm/b12x/…) re-download and
|
|
|
|
|
+# re-compile. Override the dir with SM121_BUILDKIT_CACHE if desired.
|
|
|
|
|
+CACHE_DIR="${SM121_BUILDKIT_CACHE:-$HOME/.cache/sm121-buildkit}"
|
|
|
|
|
+mkdir -p "${CACHE_DIR}"
|
|
|
|
|
+docker buildx build --cache-from "type=local,src=${CACHE_DIR}" \
|
|
|
|
|
+ --cache-to "type=local,dest=${CACHE_DIR},mode=max" \
|
|
|
|
|
+ --progress=plain --load -t "${TAG}" . 2>&1
|
|
|
|
|
+echo "=== Done: ${TAG} ==="
|