services: vllm: image: "{{ vllm_image }}" container_name: vllm networks: - llmnet ports: - "8000:8000" volumes: # model cache on local disk — tens of GB per model - "{{ appdata_path }}/models/huggingface:/root/.cache/huggingface" environment: - NVIDIA_VISIBLE_DEVICES=all - NVIDIA_DRIVER_CAPABILITIES=compute,utility - "HUGGING_FACE_HUB_TOKEN={{ hf_token | default('') }}" command: - --model - "{{ vllm_model }}" - --served-model-name - "{{ vllm_served_model_name }}" # fixed VRAM share so the embedding server keeps its slice (§0: "it just works") - --gpu-memory-utilization - "{{ vllm_gpu_memory_utilization }}" - --max-model-len - "{{ vllm_max_model_len }}" # vLLM needs a large shared-memory segment; without this it dies on startup ipc: host deploy: resources: reservations: devices: - driver: nvidia count: 1 capabilities: [gpu] runtime: nvidia restart: unless-stopped