-
Notifications
You must be signed in to change notification settings - Fork 81
/
docker-compose.yml
55 lines (52 loc) · 1.21 KB
/
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
55
version: "3"
services:
eval:
container_name: eval
image: eval
build:
dockerfile: build/Dockerfile.cpu
context: .
volumes:
- ./static/:/app/static/
- ./playground/:/app/playground/
ports:
- "4500:4500"
- "6500:6500"
- "8000:8000" # eval port
environment:
- USE_GPU=False
- CELERY_BROKER_URL=redis://redis:6379
env_file:
- .env
depends_on:
- redis
eval.gpu:
container_name: eval.gpu
image: eval.gpu
build:
dockerfile: build/Dockerfile.gpu
context: .
volumes: # if you want to decrease your model download time, use this.
- ../.cache/huggingface/:/root/.cache/huggingface/
- ./static/:/app/static/
- ./playground/:/app/playground/
ports:
- "4500:4500"
- "6500:6500"
- "8000:8000" # eval port
environment:
- USE_GPU=True
- CELERY_BROKER_URL=redis://redis:6379
env_file:
- .env
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ["1"] # You can choose which GPU to use
capabilities: [gpu]
depends_on:
- redis
redis:
image: redis:alpine