-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.comfy.yml
More file actions
55 lines (53 loc) · 1.66 KB
/
docker-compose.comfy.yml
File metadata and controls
55 lines (53 loc) · 1.66 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
services:
# ComfyUI service (sidecar for GPU workers)
comfy:
image: joegaffney/deferred-diffusion:comfy-latest
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
cap_add:
- CHOWN
- SETUID
- SETGID
build:
context: .
dockerfile: Dockerfile.comfy
volumes:
- comfy_models:/app/ComfyUI/models:rw # For user access to models - make :ro in production if needed
- comfy_custom_nodes:/app/ComfyUI/custom_nodes:rw # For user access to custom nodes - make :ro in production if needed
- comfy_user:/app/ComfyUI/user:rw # For user access to user data - make :ro in production if needed
ports:
- "127.0.0.1:8188:8188" # Localhost only
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
# ComfyUI sync service - change paths as needed
comfy-sync:
image: alpine:latest
volumes:
- ${COMFY_MODELS_PATH:-Y:/COMFY/models}:/source_models:ro
- ${COMFY_NODES_PATH:-Y:/COMFY/custom_nodes}:/source_nodes:ro
- comfy_models:/dest_models
- comfy_custom_nodes:/dest_nodes
command: >
sh -c "
echo 'Setting up...' &&
apk add --no-cache rsync &&
echo 'Syncing custom nodes...' &&
rsync -av /source_nodes/ /dest_nodes/ &&
echo 'Syncing models...' &&
rsync -av /source_models/ /dest_models/ &&
echo 'ComfyUI sync complete!'
"
volumes:
comfy_models:
name: deferred-diffusion_comfy_models
comfy_custom_nodes:
name: deferred-diffusion_comfy_custom_nodes
comfy_user:
name: deferred-diffusion_comfy_user