-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
109 lines (105 loc) · 2.86 KB
/
docker-compose.yml
File metadata and controls
109 lines (105 loc) · 2.86 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
# ALICE Docker Compose Configuration
# SPDX-License-Identifier: GPL-3.0-only
#
# Usage:
# CPU: docker compose up -d
# CUDA: docker compose --profile cuda up -d
# ROCm: docker compose --profile rocm up -d
#
# Models: Place .safetensors files in ./models/ (or set ALICE_MODELS_DIR)
# Config: Override with ALICE_CONFIG_FILE=./my-config.yaml
services:
# ==========================================
# CPU-only (default)
# ==========================================
alice:
build:
context: .
dockerfile: Dockerfile
args:
GPU: cpu
image: ghcr.io/syntheticautonomicmind/alice:latest
container_name: alice
ports:
- "${ALICE_PORT:-8080}:8080"
volumes:
- ${ALICE_MODELS_DIR:-./models}:/data/models
- alice-images:/data/images
- alice-data:/data/data
- alice-logs:/data/logs
- ${ALICE_CONFIG_FILE:-./docker/config.docker.yaml}:/config/config.yaml:ro
environment:
- ALICE_CONFIG=/config/config.yaml
restart: unless-stopped
profiles:
- cpu
- default
# ==========================================
# NVIDIA CUDA
# ==========================================
alice-cuda:
build:
context: .
dockerfile: Dockerfile
args:
GPU: cuda
image: ghcr.io/syntheticautonomicmind/alice:cuda
container_name: alice
ports:
- "${ALICE_PORT:-8080}:8080"
volumes:
- ${ALICE_MODELS_DIR:-./models}:/data/models
- alice-images:/data/images
- alice-data:/data/data
- alice-logs:/data/logs
- ${ALICE_CONFIG_FILE:-./docker/config.docker.yaml}:/config/config.yaml:ro
environment:
- ALICE_CONFIG=/config/config.yaml
- NVIDIA_VISIBLE_DEVICES=all
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
restart: unless-stopped
profiles:
- cuda
# ==========================================
# AMD ROCm
# ==========================================
alice-rocm:
build:
context: .
dockerfile: Dockerfile.rocm
image: ghcr.io/syntheticautonomicmind/alice:rocm
container_name: alice
ports:
- "${ALICE_PORT:-8080}:8080"
volumes:
- ${ALICE_MODELS_DIR:-./models}:/data/models
- alice-images:/data/images
- alice-data:/data/data
- alice-logs:/data/logs
- ${ALICE_CONFIG_FILE:-./docker/config.docker.yaml}:/config/config.yaml:ro
environment:
- ALICE_CONFIG=/config/config.yaml
- PYTORCH_HIP_ALLOC_CONF=expandable_segments:True
- MIOPEN_DEBUG_FIND_ALL=0
devices:
- /dev/kfd:/dev/kfd
- /dev/dri:/dev/dri
group_add:
- video
- render
restart: unless-stopped
profiles:
- rocm
volumes:
alice-images:
name: alice-images
alice-data:
name: alice-data
alice-logs:
name: alice-logs