-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgpu-docker-compose.yml
54 lines (47 loc) · 1.05 KB
/
gpu-docker-compose.yml
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
services:
web_ui:
build:
context: ./web_ui
dockerfile: Dockerfile_webui
ports:
- "${WEB_UI_EXPOSED_PORT}:7860"
depends_on:
- api
api:
build:
context: ./api
dockerfile: Dockerfile_api
volumes:
- img_store:/img_store
ports:
- "${WEB_API_EXPOSED_PORT}:8000"
env_file:
- ./container_configs.env
depends_on:
- redis
redis:
image: "redis:alpine"
# redis uses the default port 6379,
# and is not exposed to the host machine
# so it can only be accessed by other containers
# in the same network
inference:
build:
context: inference
dockerfile: Dockerfile_inference
volumes:
- img_store:/img_store
env_file:
- ./container_configs.env
# similar to redis, inference is not exposed to the host machine
depends_on:
- redis
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
volumes:
img_store: