-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
73 lines (69 loc) · 1.44 KB
/
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
services:
fastapi:
container_name: fastapi
build:
context: .
dockerfile: Dockerfile.gliclass
command: "fastapi run app/main.py --port 8080"
volumes:
- ./app/:/app
ports:
- 8080:8080
links:
- redis
- celery_worker
env_file:
- .env
redis:
container_name: redis
image: redis:7.2.4-alpine
ports:
- "6379:6379"
locust:
container_name: locust
build:
context: .
dockerfile: Dockerfile.gliclass
command: "locust -f locustfile.py"
ports:
- 8089:8089
volumes:
- .:/code
working_dir: /code
env_file:
- .env
depends_on:
- fastapi
celery_worker:
container_name: celery_worker
build:
context: .
dockerfile: Dockerfile.gliclass
command: "celery -A app.src.celery_worker.gliclass_app worker --loglevel=info"
volumes:
- ./app/:/app
env_file:
- .env
environment:
- HF_HOME=/app/.cache/huggingface
links:
- redis
depends_on:
- redis
shm_size: 2gb # to load model weights - NuNER & gliclass large are ~1.8GB
flower:
container_name: flower
build:
context: .
dockerfile: Dockerfile.gliclass
command: "celery -A app.src.celery_worker.gliclass_app flower --port=5555"
ports:
- 5556:5555
volumes:
- ./app/:/app
env_file:
- .env
depends_on:
- fastapi
- redis
- celery_worker