37 lines
1.6 KiB
Desktop File
37 lines
1.6 KiB
Desktop File
[Unit]
|
|
Description=CyberGril approved first-use instance
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
StartLimitIntervalSec=60
|
|
StartLimitBurst=3
|
|
|
|
[Service]
|
|
Type=exec
|
|
WorkingDirectory=/opt/cybergril-hel913/current
|
|
Environment=TZ=Asia/Shanghai
|
|
Environment=PYTHONPATH=/opt/cybergril-hel913/current/src
|
|
Environment=CYBERGRIL_DB=/opt/cybergril-hel913/data/companion.db
|
|
Environment=CYBERGRIL_MODELS=/opt/cybergril-hel913/etc/models.yaml
|
|
Environment=CYBERGRIL_VOICE_CONFIG=/opt/cybergril-hel913/etc/voice.yaml
|
|
Environment=CYBERGRIL_WEB=/opt/cybergril-hel913/current/web/dist
|
|
Environment=CYBERGRIL_SEMANTIC=mem0
|
|
Environment=CYBERGRIL_SEMANTIC_CONFIG=/opt/cybergril-hel913/etc/semantic.yaml
|
|
Environment=CYBERGRIL_R2_ENABLED=1
|
|
Environment=CYBERGRIL_LIFE_TIMEZONE=Asia/Shanghai
|
|
Environment=MEM0_TELEMETRY=False
|
|
Environment=FASTEMBED_CACHE_PATH=/opt/cybergril-hel913/data/sem/fastembed-cache
|
|
Environment=HF_HUB_OFFLINE=1
|
|
Environment=TRANSFORMERS_OFFLINE=1
|
|
ExecStartPre=/opt/cybergril-hel913/venv311/bin/python /opt/cybergril-hel913/ops/window_guard.py /opt/cybergril-hel913/window.json
|
|
ExecStart=/opt/cybergril-hel913/venv311/bin/python deploy/voice/serve_dual_8360_8361.py --http-port 8360 --https-port 8361 --cert /opt/cybergril-voice-certs/cybergril-voice.pem --key /opt/cybergril-voice-certs/cybergril-voice.key
|
|
ExecStartPost=/usr/bin/bash -c 'echo "$MAINPID" > /opt/cybergril-hel913/logs/api.pid'
|
|
Restart=on-failure
|
|
RestartSec=3
|
|
TimeoutStopSec=30
|
|
KillMode=mixed
|
|
StandardOutput=append:/opt/cybergril-hel913/logs/api.log
|
|
StandardError=append:/opt/cybergril-hel913/logs/api.log
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|