#!/usr/bin/env bash # Build the SM121 DeepSeek-V4-Flash-Vision-Exp image. The generic driver # forwards every KEY=VAL pin in versions.env as a --build-arg to the # Dockerfile; TAG and BASE_IMAGE can be overridden via the environment for # the fork comparison (TAG=dsv4-flash-vision-eugr:local and # TAG=dsv4-flash-vision-aiden:local from the same context). set -euo pipefail cd "$(dirname "$0")" TAG="${TAG:-dsv4-flash-vision:local}" ARGS=() while IFS= read -r line; do case "$line" in ''|\#*) continue ;; esac key="${line%%=*}"; val="${line#*=}" val="${val%\"}"; val="${val#\"}" [ -n "$key" ] && ARGS+=(--build-arg "${key}=${val}") done < versions.env [ -n "${BASE_IMAGE:-}" ] && ARGS+=(--build-arg "BASE_IMAGE=${BASE_IMAGE}") echo "=== Building ${TAG} ===" DOCKER_BUILDKIT=1 docker build "${ARGS[@]}" --progress=plain -t "${TAG}" -f Dockerfile . 2>&1 echo "=== Done: ${TAG} ==="