#!/usr/bin/env bash set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" STACK_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)" UPSTREAM_DIR="${STACK_DIR}/upstream" REPO_URL="https://github.com/mudler/LocalAI.git" TAG="v4.4.3" cd "${STACK_DIR}" if [[ -d "${UPSTREAM_DIR}/.git" ]]; then echo "Upstream already cloned: ${UPSTREAM_DIR}" echo "Remove it first to re-clone: rm -rf upstream" exit 0 fi echo "=== Cloning LocalAI upstream (reference only) ===" echo "Repo: ${REPO_URL}" echo "Tag: ${TAG}" echo "Dest: ${UPSTREAM_DIR}" echo "" git clone --depth 1 --branch "${TAG}" "${REPO_URL}" "${UPSTREAM_DIR}" echo "" echo "Done. Use upstream/ for example model YAML and compose reference." echo "Runtime uses the official Docker image from .env — not a local build."