Snider Virgil commited on
Commit ·
816b02a
1
Parent(s): 3898f6c
feat: add systemd service + timer, replaces cron watchdog
Browse fileslem-eval.service: continuous loop worker with LEM_NAMES/LEM_TYPES env
lem-eval-maintain.timer: hourly git pull at :37 (replaces maintain cron)
Usage:
sudo cp systemd/*.service systemd/*.timer /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now lem-eval lem-eval-maintain.timer
Co-Authored-By: Virgil <virgil@lethean.io>
systemd/lem-eval-maintain.service
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[Unit]
|
| 2 |
+
Description=LEM-Eval git pull (config + tool updates)
|
| 3 |
+
After=network-online.target
|
| 4 |
+
|
| 5 |
+
[Service]
|
| 6 |
+
Type=oneshot
|
| 7 |
+
User=lemmy
|
| 8 |
+
WorkingDirectory=/home/lemmy/PycharmProjects/LEM-Eval
|
| 9 |
+
ExecStart=/home/lemmy/PycharmProjects/LEM-Eval/lem-eval.sh maintain
|
systemd/lem-eval-maintain.timer
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[Unit]
|
| 2 |
+
Description=LEM-Eval maintain timer (hourly git pull)
|
| 3 |
+
|
| 4 |
+
[Timer]
|
| 5 |
+
OnCalendar=*:37
|
| 6 |
+
Persistent=true
|
| 7 |
+
|
| 8 |
+
[Install]
|
| 9 |
+
WantedBy=timers.target
|
systemd/lem-eval.service
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[Unit]
|
| 2 |
+
Description=LEM-Eval continuous worker
|
| 3 |
+
After=network-online.target ollama.service
|
| 4 |
+
Wants=network-online.target
|
| 5 |
+
|
| 6 |
+
[Service]
|
| 7 |
+
Type=simple
|
| 8 |
+
User=lemmy
|
| 9 |
+
WorkingDirectory=/home/lemmy/PycharmProjects/LEM-Eval
|
| 10 |
+
Environment=LEM_NAMES=lemer
|
| 11 |
+
Environment=LEM_TYPES=gguf
|
| 12 |
+
Environment=PATH=/home/lemmy/.local/bin:/usr/local/bin:/usr/bin:/bin
|
| 13 |
+
ExecStart=/home/lemmy/PycharmProjects/LEM-Eval/lem-eval.sh loop
|
| 14 |
+
Restart=on-failure
|
| 15 |
+
RestartSec=30
|
| 16 |
+
|
| 17 |
+
[Install]
|
| 18 |
+
WantedBy=multi-user.target
|