Files
homelab/ansible/roles/llm-inference/tasks/vllm.yml
Hermes Agent service account dda6b91330 feat(llm-inference): Day 1 playbook for RTX 3090 vLLM stack on astro-orbiter
- nvidia-driver-595-open (already installed 2026-08-03, idempotent)
- Python venv + vLLM 0.26.0 (already installed, idempotent)
- Gemma 2 27B model download via HuggingFace hub
- systemd vllm-serve.service on port 8000
- Hermes provider integration on carousel-of-progress
- vault_hf_token added to group_vars/all/vault
- ansible.cfg: vault_password_file set to absolute path
- inventory: astro_orbiter group added

Run with: env -u ANSIBLE_VAULT_PASSWORD_FILE ansible-playbook -i inventory.yml playbooks/day1_deploy_llm_inference.yml
2026-08-03 11:51:34 -05:00

42 lines
1.3 KiB
YAML

---
# ------------------------------------------------------------------------------
# FILE: roles/llm-inference/tasks/vllm.yml
# DESCRIPTION: Phase 3 — Python venv + vLLM install.
# Idempotent: venv creation and pip install only run if the
# venv binary or vllm package is absent.
# Already completed manually on 2026-08-03 — will no-op.
# ------------------------------------------------------------------------------
- name: Create Python venv for vLLM
ansible.builtin.command:
cmd: python3 -m venv {{ llm_venv_path }}
creates: "{{ llm_venv_path }}/bin/python"
become: true
become_user: "{{ llm_venv_owner }}"
- name: Upgrade pip inside venv
ansible.builtin.pip:
name: pip
state: latest
virtualenv: "{{ llm_venv_path }}"
become: true
become_user: "{{ llm_venv_owner }}"
- name: Install vLLM
ansible.builtin.pip:
name: vllm
state: present
virtualenv: "{{ llm_venv_path }}"
become: true
become_user: "{{ llm_venv_owner }}"
- name: Verify vLLM is importable
ansible.builtin.command:
cmd: "{{ llm_venv_path }}/bin/python -c 'import vllm; print(vllm.__version__)'"
register: vllm_version
changed_when: false
- name: Print vLLM version
ansible.builtin.debug:
msg: "vLLM version: {{ vllm_version.stdout }}"