Files
AI-Profile-Router/deploy/mike-ai-profile-router.service

50 lines
1.8 KiB
Desktop File

[Unit]
Description=Mike AI Profile Router (OpenAI-kompatibler multimodaler Proxy, Port 8081)
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=/opt/mike-ai/ai-profile-router/venv/bin/python /opt/mike-ai/ai-profile-router/ai_profile_router.py
Restart=on-failure
RestartSec=3
EnvironmentFile=-/etc/mike-ai/router.env
Environment=ROUTER_HOST=0.0.0.0
Environment=ROUTER_PORT=8081
Environment=ROUTER_AUTH_MODE=required
Environment=ROUTER_API_KEY_FILE=/etc/mike-ai/router-api-key
Environment=ROUTER_STATE_FILE=/var/lib/mike-ai-profile-router/state.json
Environment=ROUTER_PROFILES_FILE=/etc/mike-ai/router-profiles.json
Environment=ROUTER_MAX_CONCURRENT_REQUESTS=16
Environment=UPSTREAM_URL=http://127.0.0.1:8080
Environment=PROFILE_SCRIPT=/usr/local/bin/llama-profile
Environment=PROFILE_DIR=/etc/systemd/system/mike-ai-llama-ui.service.d
Environment=SWITCH_TIMEOUT=600
Environment=REQUEST_TIMEOUT=600
Environment=LLAMA_SERVICE=mike-ai-llama-ui.service
Environment=IMAGE_WORKER=/opt/mike-ai/ai-profile-router/image_worker.py
Environment=IMAGE_PYTHON=/opt/mike-ai/ai-profile-router/venv/bin/python
Environment=IMAGE_DIR=/opt/mike-ai/ai-profile-router/images
Environment=IMAGE_WORKER_LOG=/opt/mike-ai/ai-profile-router/worker.log
Environment=IMAGE_GEN_TIMEOUT=600
Environment=IMAGE_VRAM_FREE_TIMEOUT=120
Environment=IMAGE_RETENTION_FILES=100
Environment=IMAGE_RETENTION_BYTES=5368709120
Environment=IMAGE_RETENTION_DAYS=30
Environment=CHAT_IMAGE_MAX_BYTES=20971520
Environment=CHAT_IMAGE_ALLOW_REMOTE_URLS=false
NoNewPrivileges=true
PrivateTmp=true
ProtectHome=true
ProtectKernelLogs=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectControlGroups=true
LockPersonality=true
RestrictRealtime=true
RestrictSUIDSGID=true
UMask=0077
[Install]
WantedBy=multi-user.target