build.sh 627 B

12345678910111213
  1. #!/usr/bin/env bash
  2. # Build on the box that will run it -- there is no cross-build for aarch64 here.
  3. # The context is the repo root, not image/, so the vllm symlink (into the
  4. # spark-agent submodule) stays inside it. Copy the tree to a build box with
  5. # `rsync -a`, which keeps the hidden .submodules/ and the symlink.
  6. set -euo pipefail
  7. TAG="${TAG:-spark-glm53:v9}"
  8. cd "$(dirname "$0")/.."
  9. args=(-t "$TAG" -f image/Dockerfile)
  10. [ -n "${BASE:-}" ] && args+=(--build-arg "BASE=$BASE")
  11. [ -n "${MENTAT_VERSION:-}" ] && args+=(--build-arg "MENTAT_VERSION=$MENTAT_VERSION")
  12. sudo docker build "${args[@]}" .
  13. echo "built $TAG"