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>
30 lines
979 B
Bash
Executable File
30 lines
979 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# One-shot deploy: gpu-fan agent :18090 + server-ui proxy. Run: sudo scripts/deploy-gpu-fan-fix.sh
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
STACKS_DIR="$(cd "${SCRIPT_DIR}/../.." && pwd)"
|
|
|
|
if [[ "${EUID}" -ne 0 ]]; then
|
|
echo "Run as root: sudo ${SCRIPT_DIR}/deploy-gpu-fan-fix.sh"
|
|
exit 1
|
|
fi
|
|
|
|
echo "=== GPU Fan integration deploy ==="
|
|
|
|
pkill -f "stacks/server-ui/.venv/bin/python app.py" 2>/dev/null || true
|
|
pkill -f "SERVER_UI_PORT=18091" 2>/dev/null || true
|
|
pkill -f "SERVER_UI_PORT=8092" 2>/dev/null || true
|
|
|
|
"${STACKS_DIR}/gpu-fan/scripts/install.sh"
|
|
"${SCRIPT_DIR}/install.sh"
|
|
|
|
echo ""
|
|
echo "=== Verification ==="
|
|
UI_KEY="$(grep '^API_KEY=' /opt/control-plane/.env | cut -d= -f2-)"
|
|
curl -sf "http://127.0.0.1:8091/api/gpu-fan/health" -H "X-API-Key: ${UI_KEY}" | head -c 200
|
|
echo ""
|
|
echo ""
|
|
echo "Panel: http://$(hostname -I | awk '{print $1}'):8091/#gpu-fan"
|
|
echo "API key: grep ^API_KEY= /opt/control-plane/.env"
|