Files
rpa_vision_v3/deploy/systemd/rpa-vision-v3-api.service
Dom d0c794d923
Some checks failed
tests / Lint (ruff + black) (push) Failing after 1m47s
tests / Tests unitaires (sans GPU) (push) Failing after 1m56s
tests / Tests sécurité (critique) (push) Has been skipped
fix(systemd): bind upload api to loopback
2026-06-17 20:01:27 +02:00

48 lines
1.4 KiB
Desktop File

[Unit]
Description=RPA Vision V3 - Upload API (FastAPI)
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
# ---- Runtime ----
User=dom
Group=dom
WorkingDirectory=/home/dom/ai/rpa_vision_v3
EnvironmentFile=/home/dom/ai/rpa_vision_v3/.env.local
Environment="PYTHONUNBUFFERED=1"
Environment="ENVIRONMENT=production"
Environment="RPA_SERVICE_NAME=rpa-vision-v3-api"
# Keep the upload API internal to the DGX; other LAN-facing services keep the shared bind host.
Environment="RPA_BIND_HOST=127.0.0.1"
# Service grounding persistant — socket + répertoire d'images partagés via /run/rpa/.
# Si le service rpa-grounding n'est pas démarré, le client retombe automatiquement
# sur le subprocess one-shot (cf. ui_tars_grounder.py).
Environment="RPA_GROUNDING_SOCKET=/run/rpa/grounding.sock"
Environment="RPA_GROUNDING_IMG_DIR=/run/rpa"
ExecStart=/home/dom/ai/rpa_vision_v3/.venv/bin/python3 server/api_upload.py
# ---- Resilience ----
Restart=on-failure
RestartSec=3
TimeoutStopSec=30
# ---- Hardening ----
NoNewPrivileges=true
PrivateTmp=true
# /run/rpa/ partagé avec rpa-grounding pour le socket et les images grounding.
# Le service rpa-grounding crée le répertoire ; ici on l'expose au /run du service.
RuntimeDirectory=rpa
RuntimeDirectoryMode=0755
RuntimeDirectoryPreserve=yes
# Logs -> journald
StandardOutput=journal
StandardError=journal
SyslogIdentifier=rpa-vision-v3-api
[Install]
WantedBy=multi-user.target