[Unit] # Runs on the workstation (bugmachine), 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 while the card is free) After=network.target [Service] 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