Files
alexandre.pires 350650ecc2 Add GPU monitoring services and configurations
- Create systemd service templates for llama_exporter, nvidia_exporter, and podman.
- Add Prometheus configuration template for GPU metrics scraping.
- Introduce variables for GPU monitoring role in main.yml.
- Implement tasks for syncing llama models, including user setup and package installation.
- Update podman tasks to ensure proper sudo access and lingering for the podman user.
- Modify inventory to include gpu_monitoring group.
- Add Terraform modules for deploying Vaultwarden, including ingress and service configurations.
- Create Grafana dashboard for real-time GPU monitoring metrics.
- Update secrets and environment files to include Vaultwarden admin token.
2026-05-29 23:42:14 +02:00

35 lines
832 B
Django/Jinja

# nvidia_gpu_exporter - Prometheus exporter for NVIDIA GPUs via NVML
#
# Exposes GPU metrics at /metrics port {{ nvidia_exporter_port }}
[Unit]
Description=NVIDIA GPU Prometheus Exporter
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User={{ nvidia_exporter_user }}
Group={{ nvidia_exporter_user }}
WorkingDirectory={{ nvidia_exporter_install_dir }}
Environment="PYTHONUNBUFFERED=1"
ExecStart={{ nvidia_exporter_venv_path }}/bin/python3 {{ nvidia_exporter_script_path }}
Restart=on-failure
RestartSec=5
TimeoutStopSec=10
StandardOutput=journal
StandardError=journal
# Security hardening
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=true
ReadOnlyPaths=/sys
PrivateTmp=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
[Install]
WantedBy=multi-user.target