33 lines
1.2 KiB
Desktop File
33 lines
1.2 KiB
Desktop File
[Unit]
|
|
Description=llama.cpp OpenAI-compatible server (Qwen3.8-27B Q4_K_P, 3x Turing GPUs, 256K ctx)
|
|
Documentation=file:///opt/llama-server/README.md
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
# Required: without this the loader binds a stale libcuda.so.1 (550) from
|
|
# /usr/lib/x86_64-linux-gnu/nvidia/current and CUDA init fails with
|
|
# "system has unsupported display driver / cuda driver combination".
|
|
Environment=LD_LIBRARY_PATH=/opt/llama.cpp/build-nccl/bin:/opt/minicpm-venv/lib/python3.13/site-packages/nvidia/nccl/lib:/lib/x86_64-linux-gnu
|
|
ExecStart=/opt/llama-server/start.sh
|
|
Restart=on-failure
|
|
RestartSec=10
|
|
# Model load takes ~20s; give it time to come up cleanly
|
|
TimeoutStartSec=300
|
|
TimeoutStopSec=60
|
|
# Basic hardening (server only listens on :8080, reads models read-only)
|
|
ProtectSystem=strict
|
|
ProtectHome=read-only
|
|
ReadWritePaths=/var/cache/llama-slots /tmp
|
|
NoNewPrivileges=true
|
|
PrivateTmp=true
|
|
# Do not cap memory/CPU; inference needs all of it
|
|
LimitNOFILE=1048576
|
|
# NUMA Affinity: Pin to CPU Socket 1 (NUMA Node 1) where Riser 1 GPUs physically connect (24-thread v2 CPU)
|
|
CPUAffinity=6-11,18-23
|
|
NUMAPolicy=bind
|
|
NUMAMask=1
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target |