make local-llama service

This commit is contained in:
Сергей Маринкевич
2026-06-22 11:45:04 +07:00
parent 2b5977b605
commit 99bd39b47a
2 changed files with 27 additions and 6 deletions
+25
View File
@@ -0,0 +1,25 @@
[Unit]
Description=llama-server (local-llama)
After=network.target
[Service]
Type=simple
User=grayhook
Group=grayhook
WorkingDirectory=/home/grayhook/Documents/llama-space
EnvironmentFile=/home/grayhook/Documents/llama-space/.env
ExecStart=/home/grayhook/Documents/llama-space/local-llama.sh
Restart=on-failure
RestartSec=5
# CPU pinning: taskset -c 0-11
CPUAffinity=0-11
# ulimit -l unlimited → lock memory (mlockall / MADV_POPULATE_READ + mlock)
LimitMEMLOCK=infinity
# Не убивать OOM killer — модель критична
OOMScoreAdjust=-900
[Install]
WantedBy=multi-user.target