Broke a few things, added a few more
This commit is contained in:
19
ansible/roles/vllm/defaults/main.yml
Normal file
19
ansible/roles/vllm/defaults/main.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
vllm_install_dir: /opt/vllm
|
||||
vllm_model_dir: "{{ vllm_install_dir }}/data"
|
||||
vllm_image: vllm/vllm-openai
|
||||
vllm_image_tag: latest
|
||||
vllm_container_labels: []
|
||||
vllm_container_env: {}
|
||||
#https://www.jan.ai/docs/desktop/jan-models/jan-code-4b
|
||||
# vllm_model: "unsloth/Qwen3.5-35B-A3B-GGUF"
|
||||
#DavidAU/Qwen3.5-40B-Claude-4.6-Opus-Deckard-Heretic-Uncensored-Thinking
|
||||
#DavidAU/Qwen3.5-40B-RoughHouse-Claude-4.6-Opus-Polar-Deckard-Uncensored-Heretic-Thinking
|
||||
vllm_model: "unsloth/Qwen3.5-35B-A3B-GGUF"
|
||||
vllm_args:
|
||||
- --enable-prefix-caching
|
||||
- --enable-auto-tool-choice
|
||||
- --reasoning-parser
|
||||
- qwen3
|
||||
- --tool-call-parser
|
||||
- qwen3_coder
|
||||
18
ansible/roles/vllm/tasks/deploy/main.yml
Normal file
18
ansible/roles/vllm/tasks/deploy/main.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
- name: Create vllm Directories
|
||||
ansible.builtin.file:
|
||||
state: directory
|
||||
path: "{{ vllm_install_dir }}/{{ item }}"
|
||||
loop:
|
||||
- data
|
||||
- compose
|
||||
|
||||
- name: Pull vllm Image
|
||||
community.docker.docker_image:
|
||||
source: pull
|
||||
name: "{{ vllm_image }}:{{ vllm_image_tag }}"
|
||||
|
||||
- name: Copy composefile
|
||||
ansible.builtin.template:
|
||||
src: templates/composefile.yml
|
||||
dest: "{{ vllm_install_dir }}/compose/composefile.yml"
|
||||
5
ansible/roles/vllm/tasks/main.yml
Normal file
5
ansible/roles/vllm/tasks/main.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- name: Include selected operations for vLLM
|
||||
tags:
|
||||
- vllm
|
||||
ansible.builtin.include_tasks: "{{ deployment_action|default('deploy') }}/main.yml"
|
||||
33
ansible/roles/vllm/templates/composefile.yml
Normal file
33
ansible/roles/vllm/templates/composefile.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
services:
|
||||
|
||||
vllm:
|
||||
image: {{ vllm_image }}:{{ vllm_image_tag }}
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
devices:
|
||||
- driver: nvidia
|
||||
count: all
|
||||
capabilities: [gpu]
|
||||
network_mode: host
|
||||
ipc: host
|
||||
command:
|
||||
# TODO: Fix identation... again
|
||||
- {{ vllm_model }}
|
||||
{% if vllm_args %}
|
||||
{{ vllm_args|to_nice_yaml|indent(4) }}
|
||||
{% endif %}
|
||||
volumes:
|
||||
- {{ vllm_model_dir }}:/root/.cache/huggingface
|
||||
tty: true
|
||||
restart: unless-stopped
|
||||
{% if vllm_container_env %}
|
||||
environment:
|
||||
{{ vllm_container_env|to_nice_yaml|indent(6) }}
|
||||
{% endif %}
|
||||
{% if vllm_container_labels %}
|
||||
labels:
|
||||
{{ vllm_container_labels|to_nice_yaml|indent(4) }}
|
||||
{% endif %}
|
||||
|
||||
#vllm pull hf.co/unsloth/Apriel-1.5-15b-Thinker-GGUF:UD-Q4_K_XL
|
||||
Reference in New Issue
Block a user