feat: add /v1/models endpoint and systemd service for orchestrator

- Add OpenAI-compatible /v1/models endpoint to list available models
- Create systemd service file for proper service management
- Service runs as root with automatic restart on failure
- Logs to systemd journal for easy debugging
This commit is contained in:
2025-11-21 19:28:16 +01:00
parent 9947fe37bb
commit 91089d3edc
2 changed files with 45 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
[Unit]
Description=AI Model Orchestrator for RunPod
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=10
User=root
WorkingDirectory=/workspace/ai
EnvironmentFile=/workspace/ai/.env
ExecStart=/usr/bin/python3 /workspace/ai/model-orchestrator/orchestrator_subprocess.py
StandardOutput=journal
StandardError=journal
SyslogIdentifier=ai-orchestrator
# Process management
KillMode=process
KillSignal=SIGTERM
TimeoutStopSec=30
[Install]
WantedBy=multi-user.target