-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.gpu.yml
More file actions
37 lines (34 loc) · 1.01 KB
/
Copy pathdocker-compose.gpu.yml
File metadata and controls
37 lines (34 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Override para servir un LLM REAL con vLLM (requiere GPU NVIDIA + NVIDIA Container Toolkit).
# 1. En .env: LLM_PROVIDER=vllm y LLM_BASE_URL=http://vllm:8000/v1
# 2. docker compose -f docker-compose.yml -f docker-compose.gpu.yml up -d
#
# Añade el servidor vLLM oficial (API compatible con OpenAI). El gateway `llm` le habla.
services:
vllm:
image: vllm/vllm-openai:latest
command: >
--model mistralai/Mistral-7B-Instruct-v0.2
--max-model-len 8192
environment:
HUGGING_FACE_HUB_TOKEN: ${HUGGING_FACE_HUB_TOKEN:-}
volumes:
- hf_cache:/root/.cache/huggingface
ports:
- "8002:8000"
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
# El gateway apunta al servidor vLLM
llm:
environment:
LLM_PROVIDER: vllm
LLM_BASE_URL: http://vllm:8000/v1
LLM_MODEL: mistralai/Mistral-7B-Instruct-v0.2
depends_on:
- vllm
volumes:
hf_cache: