Funk-lab/ansible/roles/llama_server/templates/llama-server.service.j2
alkatrazz 83c10feae7 fix: monitoring — collecte métriques externes (nftables, llama --metrics, ROCm via 9100)
- nftables storage-01 : ports 9100 (node_exporter) + 9093 (webhook) ouverts pour 192.168.10.0/24
- llama-server : ajout --metrics pour exposer /metrics sur les 3 instances
- values.yaml : suppression job gpu-01-rocm:9101 inexistant (ROCm passe par node_exporter 9100 textfile_collector)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 22:41:19 +02:00

29 lines
790 B
Django/Jinja

[Unit]
Description=llama-server (llama.cpp OpenAI-compatible API)
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=root
Environment=HSA_OVERRIDE_GFX_VERSION={{ hsa_override_gfx_version }}
Environment=LD_LIBRARY_PATH={{ rocm_path }}/lib
ExecStart=/opt/llama.cpp/build/bin/llama-server \
--model {{ llama_model_path }} \
--host {{ llama_server_host }} \
--port {{ llama_server_port }} \
--ctx-size {{ llama_ctx_size }} \
--n-gpu-layers {{ llama_n_gpu_layers }} \
--parallel {{ llama_parallel }} \
--alias {{ llama_model_alias }} \
{% if llama_embeddings %}
--embeddings \
--pooling {{ llama_pooling }} \
{% endif %}
--metrics \
--log-disable
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target