359afb3a59
Infrastructure configs for GMKtec K11 (Docker, vLLM, LocalAI, ComfyUI, control-plane, gpu-fan agent, Server UI with CLI/file explorer/GPU fan curve). Co-authored-by: Cursor <cursoragent@cursor.com>
47 lines
1.2 KiB
Bash
Executable File
47 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
STACK_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
|
|
|
|
# shellcheck disable=SC1091
|
|
source "${SCRIPT_DIR}/catalog-lib.sh"
|
|
|
|
cd "${STACK_DIR}"
|
|
|
|
if [[ -f .env ]]; then
|
|
set -a
|
|
# shellcheck disable=SC1091
|
|
source .env
|
|
set +a
|
|
fi
|
|
|
|
DATA_ROOT="${DATA_ROOT:-/data}"
|
|
catalog_ensure_dirs "${DATA_ROOT}"
|
|
|
|
echo "=== Model catalog ==="
|
|
echo "Catalog: ${CATALOG_FILE}"
|
|
echo "Data: ${DATA_ROOT}"
|
|
echo ""
|
|
|
|
printf "%-24s %-10s %-8s %s\n" "ID" "RUNTIME" "ON DISK" "NAME"
|
|
printf "%-24s %-10s %-8s %s\n" "----" "-------" "-------" "----"
|
|
|
|
while IFS= read -r model_id; do
|
|
name="$(catalog_get_field "${model_id}" name)"
|
|
runtime="$(catalog_get_field "${model_id}" runtime)"
|
|
if catalog_model_downloaded "${model_id}"; then
|
|
on_disk="yes"
|
|
else
|
|
on_disk="no"
|
|
fi
|
|
printf "%-24s %-10s %-8s %s\n" "${model_id}" "${runtime}" "${on_disk}" "${name}"
|
|
done < <(catalog_list_ids)
|
|
|
|
echo ""
|
|
echo "Download on demand: ./scripts/download-model.sh <id>"
|
|
echo "Switch vLLM profile: ./scripts/switch-model.sh <profile-name>"
|
|
echo ""
|
|
echo "Profiles in profiles/:"
|
|
ls -1 "${STACK_DIR}/profiles/"*.env 2>/dev/null | xargs -n1 basename | sed 's/^/ /' || true
|