File size: 1,435 Bytes
9c0b225
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
38
39
# ═══════════════════════════════════════════════════════════
#  PC 1 β€” GPU Inference Node (vLLM only)
# ═══════════════════════════════════════════════════════════
#  Run on the PC with the GPU. Exposes vLLM on port 8001.
#  PC 2 connects to this PC's IP:8001 for AI inference.
#
#  Usage:
#    docker compose -f docker-compose.pc1-gpu.yml up -d
# ═══════════════════════════════════════════════════════════

services:
  vllm-speed:
    image: vllm/vllm-openai:latest
    container_name: mac-vllm-speed
    ports:
      - "8001:8001"
    environment:
      - HF_HOME=/root/.cache/huggingface
    volumes:
      - hf-cache:/root/.cache/huggingface
    command: >
      --model Qwen/Qwen2.5-7B-Instruct-AWQ
      --port 8001
      --gpu-memory-utilization 0.90
      --max-model-len 8192
      --trust-remote-code
      --enforce-eager
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]
    restart: unless-stopped

volumes:
  hf-cache: