make local-llama service
This commit is contained in:
@@ -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
|
||||||
+2
-6
@@ -1,12 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -a # Automatically export all variables defined next
|
set -euo pipefail
|
||||||
source .env # Load the file
|
|
||||||
set +a # Disable automatic export
|
|
||||||
|
|
||||||
sudo ulimit -l unlimited
|
/home/bazzite/Документы/llama-cpp-turboquant/build/bin/llama-server \
|
||||||
|
|
||||||
taskset -c 0-11 /home/bazzite/Документы/llama-cpp-turboquant/build/bin/llama-server \
|
|
||||||
-m "models/${MODEL_FILE}" \
|
-m "models/${MODEL_FILE}" \
|
||||||
--host 0.0.0.0 \
|
--host 0.0.0.0 \
|
||||||
--port 8080 \
|
--port 8080 \
|
||||||
|
|||||||
Reference in New Issue
Block a user