-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathdocker-compose.nvidia.yml
More file actions
executable file
·56 lines (53 loc) · 1.62 KB
/
Copy pathdocker-compose.nvidia.yml
File metadata and controls
executable file
·56 lines (53 loc) · 1.62 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Docker Compose for NVIDIA GPUs
#
# Requirements:
# - NVIDIA GPU with drivers installed
# - NVIDIA Container Toolkit: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html
#
# Quick Start:
# 1. Copy this file to your project root: cp docs/docker-compose.nvidia.yml docker-compose.yml
# 2. Copy environment template: cp ENV_DEFAULT .env
# 3. Run: docker-compose --compatibility up -d
# OR: docker compose up -d --gpus all
#
# Verify GPU access:
# docker exec smarterrouter nvidia-smi
#
# Troubleshooting:
# - If nvidia-smi fails, ensure NVIDIA Container Toolkit is installed
# - Check logs: docker logs smarterrouter
services:
smarterrouter:
image: ghcr.io/peva3/smarterrouter:latest
container_name: smarterrouter
ports:
- "11436:11436"
env_file:
- .env
volumes:
- ./data:/app/data:rw
- type: tmpfs
target: /tmp
restart: unless-stopped
networks:
- smarterrouter-network
healthcheck:
test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:11436/health')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
# NVIDIA GPU configuration
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all # Use all NVIDIA GPUs
capabilities: [gpu]
# Optional: Environment overrides for NVIDIA-specific settings
# environment:
# - ROUTER_VRAM_MAX_TOTAL_GB=22 # Limit VRAM usage (leave 2GB buffer)
networks:
smarterrouter-network:
driver: bridge