1456336652
serve.py lived only on workpc, which was fine while systemd launched it and is
not fine now that mavgpud does. Two endpoints and no framework: /health answers
503 until the model is loaded, /transcribe takes raw PCM and returns
{"text","confidence"}.
The unit carries CW2_TOKEN through EnvironmentFile and the child inherits it,
so the token is never a flag value.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ptwopxyo3Z2kwFckHkLvN
34 lines
1.4 KiB
Desktop File
34 lines
1.4 KiB
Desktop File
[Unit]
|
|
# Runs on the workstation (workpc), not on homesrv. Install as a systemd
|
|
# user unit and turn on lingering, so the card is supervised after a reboot
|
|
# with nobody logged in:
|
|
#
|
|
# scp mavgpud workpc:~/.local/bin/mavgpud
|
|
# scp deploy/mavgpud.json workpc:~/.config/mavgpud.json
|
|
# scp deploy/mavgpud.service workpc:~/.config/systemd/user/mavgpud.service
|
|
# ssh workpc 'systemctl --user daemon-reload && systemctl --user enable --now mavgpud'
|
|
# sudo loginctl enable-linger kami
|
|
Description=Maven GPU supervisor (holds llama-server and CW2 while the card is free)
|
|
After=network.target
|
|
|
|
[Service]
|
|
# CW2_TOKEN for the transcriber child, which inherits this environment. The
|
|
# token is read from a file and never appears as a flag value, the rule
|
|
# mavpoll and mavmaild follow. Missing file, no transcriber auth, so keep the
|
|
# dash off: a mavgpud that cannot read it must fail loudly.
|
|
EnvironmentFile=%h/Programs/cw2-service/cw2.env
|
|
ExecStart=%h/.local/bin/mavgpud -config %h/.config/mavgpud.json
|
|
Restart=always
|
|
RestartSec=5
|
|
# The card must come back when the supervisor goes down. mavgpud stops
|
|
# llama-server on SIGTERM, so give it longer than stop_grace to do that.
|
|
KillSignal=SIGTERM
|
|
TimeoutStopSec=60
|
|
# llama-server aborts inside its own static teardown on SIGTERM, so every
|
|
# routine yield used to write a multi-gigabyte core into systemd-coredump
|
|
# (Vikunja #491). Yielding is meant to happen several times a day.
|
|
LimitCORE=0
|
|
|
|
[Install]
|
|
WantedBy=default.target
|