Files
astrape-oracle/deploy/systemd/astrape-usage-tcn-training.service
T
rpotter6298 6c94a28298 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) <noreply@anthropic.com>
2026-08-30 14:20:52 +02:00

23 lines
793 B
Desktop File

[Unit]
Description=Astrape Usage TCN Adaptive Training
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
User=gibil
Group=gibil
WorkingDirectory=/srv/astrape
Environment=PYTHONUNBUFFERED=1
Environment=PYTHONDONTWRITEBYTECODE=1
# This host is a Xeon E5-2650 v2: no AVX2, no FMA. Torch dispatches kernels it
# cannot execute and dies with SIGILL inside Adam, so force the scalar path.
# The real fix is external_tcn on a GPU host; this keeps the local run alive
# until the scheduler is pointed at it.
Environment=ATEN_CPU_CAPABILITY=default
# Training competes with a 5-second Modbus poll on 8 cores. Leave headroom.
Environment=OMP_NUM_THREADS=4
Environment=MKL_NUM_THREADS=4
Nice=10
ExecStart=/srv/astrape/.venv/bin/python -m astrape_oracle.scripts.tcn.schedule