-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (67 loc) · 1.71 KB
/
Copy pathdocker-compose.yml
File metadata and controls
72 lines (67 loc) · 1.71 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
x-api-lite: &api-lite
image: ghcr.io/aymurai/api:latest
build:
context: .
dockerfile: ./docker/api/Dockerfile
target: aymurai-api
shm_size: "2gb"
ports:
- "8899:8899"
volumes:
- ./resources/cache:/resources/cache
env_file:
- .env
- .env.common
x-api-full: &api-full
image: ghcr.io/aymurai/api:full
build:
context: .
dockerfile: ./docker/api/Dockerfile
target: aymurai-api-full
shm_size: "2gb"
ports:
- "8899:8899"
restart: always
deploy:
resources:
limits:
memory: 4g
cpus: "4.0"
services:
aymurai-api:
<<: *api-lite
container_name: aymurai-api
environment:
TORCH_DEVICE: cpu
aymurai-api-gpu:
<<: *api-lite
container_name: aymurai-api-gpu
environment:
TORCH_DEVICE: cuda
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
aymurai-api-full:
<<: *api-full
container_name: aymurai-api-full
environment:
TORCH_DEVICE: cpu
aymurai-api-full-gpu:
<<: *api-full
container_name: aymurai-api-full-gpu
environment:
TORCH_DEVICE: cuda
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
limits:
memory: 4g
cpus: "4.0"