ci / test (push) Failing after 22s
Ein Pod je GPU-VM (Embed+Rerank bzw. Chat), Host-Netz mit den Ports aus dem Compose, P2000 fest per UUID (NVIDIA_VISIBLE_DEVICES). Das Device Plugin vergibt nur noch Index 0 (M4000). Rolle gpu-llamacpp: gemeinsame Vorbereitung (prepare.yml), k3s.yml mit Image-Import und Compose-Stopp; gpu-llamacpp.yml bricht ohne -e llamacpp_compose=true ab. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
53 lines
2.2 KiB
YAML
53 lines
2.2 KiB
YAML
# llama.cpp-Rollen nach k3s (Task 6.1, D6). Läuft auf ops (Verzeichnis platform/proxmox/ansible):
|
||
# ansible-playbook playbooks/gpu-llamacpp-k3s.yml # alle VMs der Gruppe gpu_llamacpp
|
||
# ansible-playbook playbooks/gpu-llamacpp-k3s.yml -e llamacpp_k3s_hosts=gpu-pve44 # nur eine VM (Pilot)
|
||
# Danach: ansible-playbook playbooks/monitoring-targets.yml (Ziele bleiben gleich, Ports wie im Compose).
|
||
#
|
||
# Kartenwahl: Das Device Plugin verwaltet nur Index 0 (M4000, in allen GPU-VMs); die P2000 bekommen die
|
||
# llama.cpp-Pods fest per UUID. Erst prüfen, dass Index 0 überall die M4000 ist, dann das Device Plugin anwenden.
|
||
- name: GPU-VMs – Index 0 ist die M4000
|
||
hosts: gpu_vms
|
||
gather_facts: false
|
||
tasks:
|
||
- name: Karte auf Index 0 lesen
|
||
ansible.builtin.command: nvidia-smi -i 0 --query-gpu=name --format=csv,noheader
|
||
register: gpu0
|
||
changed_when: false
|
||
|
||
- name: Index 0 muss die M4000 sein (sonst gibt das Device Plugin die falsche Karte frei)
|
||
ansible.builtin.assert:
|
||
that: gpu0.stdout == "Quadro M4000"
|
||
fail_msg: "{{ inventory_hostname }}: Index 0 ist {{ gpu0.stdout }}"
|
||
|
||
- name: k3s – Device Plugin nur für die M4000
|
||
hosts: localhost
|
||
connection: local
|
||
gather_facts: false
|
||
tasks:
|
||
- name: Device Plugin anwenden
|
||
ansible.builtin.command: kubectl apply -f {{ playbook_dir }}/../../../../deploy/k8s/nvidia-device-plugin.yaml
|
||
register: dp
|
||
changed_when: "'configured' in dp.stdout"
|
||
|
||
- name: Warten, bis das Device Plugin auf allen Knoten läuft
|
||
ansible.builtin.command: kubectl -n kube-system rollout status daemonset/nvidia-device-plugin-daemonset --timeout=180s
|
||
changed_when: false
|
||
|
||
- name: Jede GPU-VM meldet genau eine Karte (M4000)
|
||
ansible.builtin.command: kubectl get node {{ item }} -o jsonpath='{.status.allocatable.nvidia\.com/gpu}'
|
||
loop: "{{ groups['gpu_vms'] }}"
|
||
register: alloc
|
||
until: alloc.stdout == "1"
|
||
retries: 24
|
||
delay: 5
|
||
changed_when: false
|
||
|
||
- name: llama.cpp-Server in k3s
|
||
hosts: "{{ llamacpp_k3s_hosts | default('gpu_llamacpp') }}"
|
||
serial: 1
|
||
tasks:
|
||
- name: Rolle gpu-llamacpp (k3s)
|
||
ansible.builtin.include_role:
|
||
name: gpu-llamacpp
|
||
tasks_from: k3s
|