From 56bd0ad87d0c8c509f8a210b24c9e070e9506e04 Mon Sep 17 00:00:00 2001 From: rpotter6298 Date: Sun, 30 Aug 2026 14:20:55 +0200 Subject: [PATCH] Add systemd units Each repo carries the units for the daemons it owns. WorkingDirectory stays /srv/astrape so env/ and models/ resolve, while the code comes from the editable installs under repos/. The old astrape-db.service was misnamed -- it runs the weather forecast ingest, and collided with what would have been an astrape-db repo. It is astrape-weather-forecast.service here. The training unit forces ATEN_CPU_CAPABILITY=default, because this host has no AVX2 and torch otherwise dies with SIGILL in Adam, and caps threads with Nice so a nightly run does not starve the 5-second Modbus poll. Co-Authored-By: Claude Opus 5 (1M context) --- deploy/systemd/astrape-web.service | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 deploy/systemd/astrape-web.service diff --git a/deploy/systemd/astrape-web.service b/deploy/systemd/astrape-web.service new file mode 100644 index 0000000..6babf92 --- /dev/null +++ b/deploy/systemd/astrape-web.service @@ -0,0 +1,19 @@ +[Unit] +Description=Astrape Web UI +After=network-online.target +Wants=network-online.target + +[Service] +Type=simple +User=gibil +Group=gibil +WorkingDirectory=/srv/astrape +Environment=PYTHONUNBUFFERED=1 +Environment=PYTHONDONTWRITEBYTECODE=1 + +ExecStart=/srv/astrape/.venv/bin/python -m astrape_dashboard.scripts.daemons.web_daemon +Restart=always +RestartSec=10 + +[Install] +WantedBy=multi-user.target