#!/bin/bash # Lancement du serveur de grounding UI-TARS (port 8200) # # Le serveur charge UI-TARS-1.5-7B en 4-bit NF4 dans son propre process # Python avec un contexte CUDA propre. Le backend Flask VWB et la boucle # ORA appellent ce serveur en HTTP. # # Usage : # ./tools/start_grounding_server.sh # premier plan # ./tools/start_grounding_server.sh --bg # arriere-plan (log dans /tmp) set -e cd /home/dom/ai/rpa_vision_v3 VENV=".venv/bin/python3" LOG="/tmp/grounding_server.log" if [ ! -f "$VENV" ]; then echo "ERREUR: venv non trouve a $VENV" exit 1 fi echo "=== Serveur de Grounding UI-TARS ===" echo "Port: 8200" echo "Modele: ByteDance-Seed/UI-TARS-1.5-7B (4-bit NF4)" echo "" if [ "$1" = "--bg" ]; then echo "Lancement en arriere-plan (logs dans $LOG)" nohup $VENV -m core.grounding.server > "$LOG" 2>&1 & PID=$! echo "PID: $PID" echo "$PID" > /tmp/grounding_server.pid echo "Verifier: curl http://localhost:8200/health" echo "Logs: tail -f $LOG" else $VENV -m core.grounding.server fi