-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
135 lines (112 loc) · 2.85 KB
/
Copy pathdocker-compose.yml
File metadata and controls
135 lines (112 loc) · 2.85 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# GPU Programming 101 - Docker Compose Configuration
# Supports both NVIDIA CUDA and AMD ROCm platforms
# Updated for CUDA 12.9.1 and ROCm 7.0 (2025)
services:
# NVIDIA CUDA Development Environment
cuda-dev:
build:
context: ../
dockerfile: docker/cuda/Dockerfile
image: gpu-programming-101:cuda
container_name: gpu101-cuda-dev
hostname: cuda-dev
# GPU access for NVIDIA
runtime: nvidia
environment:
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,utility,graphics
# Volume mounts
volumes:
- ../:/workspace/gpu-programming-101:rw
- cuda-home:/root
- cuda-cache:/root/.cache
# Interactive mode
stdin_open: true
tty: true
# Working directory
working_dir: /workspace/gpu-programming-101
# Network
networks:
- gpu-dev-network
# Resource limits
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
# AMD ROCm Development Environment
rocm-dev:
build:
context: ../
dockerfile: docker/rocm/Dockerfile
image: gpu-programming-101:rocm
container_name: gpu101-rocm-dev
hostname: rocm-dev
# GPU access for AMD
devices:
- "/dev/kfd:/dev/kfd"
- "/dev/dri:/dev/dri"
# Security options for ROCm
security_opt:
- seccomp:unconfined
# Volume mounts
volumes:
- ../:/workspace/gpu-programming-101:rw
- rocm-home:/root
- rocm-cache:/root/.cache
# Interactive mode
stdin_open: true
tty: true
# Working directory
working_dir: /workspace/gpu-programming-101
# Network
networks:
- gpu-dev-network
# Environment variables
environment:
- HIP_VISIBLE_DEVICES=0
- HSA_OVERRIDE_GFX_VERSION=11.0.0
- ROCM_VERSION=7.0
# Development tools container (CPU-only for general development)
dev-tools:
build:
context: ../
dockerfile: docker/cuda/Dockerfile
target: dev-base
image: gpu-programming-101:dev-tools
container_name: gpu101-dev-tools
hostname: dev-tools
# No GPU access - for documentation, build scripts, etc.
# Volume mounts
volumes:
- ../:/workspace/gpu-programming-101:rw
- dev-home:/root
# Interactive mode
stdin_open: true
tty: true
# Working directory
working_dir: /workspace/gpu-programming-101
# Network
networks:
- gpu-dev-network
# Named volumes for persistent data
volumes:
cuda-home:
driver: local
cuda-cache:
driver: local
rocm-home:
driver: local
rocm-cache:
driver: local
dev-home:
driver: local
# Custom network
networks:
gpu-dev-network:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16