Files
Maven/deploy/mavgpud.service
T
claude 1456336652 The transcriber ships with the daemon that starts it (V-486)
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
2026-08-09 01:07:55 +04:00

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