-
Notifications
You must be signed in to change notification settings - Fork 0
/
local-gpu-docker-compose.yml
executable file
·53 lines (52 loc) · 1.43 KB
/
local-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
version: "3.8"
services:
pdf_metadata_extraction_api:
container_name: pdf_metadata_extraction_api
entrypoint: [ "gunicorn", "-k", "uvicorn.workers.UvicornWorker", "--chdir", "./src", "app:app", "--bind", "0.0.0.0:5056", "--timeout", "300" ]
init: true
restart: unless-stopped
build:
context: .
dockerfile: Dockerfile
volumes:
- data:/app/models_data
depends_on:
- mongo_metadata_extraction
- pdf_metadata_extraction_worker
environment:
- ENVIRONMENT=${ENVIRONMENT:-development}
- SENTRY_DSN=${SENTRY_DSN:-}
network_mode: 'host'
env_file: .env.local
pdf_metadata_extraction_worker:
container_name: pdf_metadata_extraction_worker
restart: unless-stopped
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [ gpu ]
init: true
entrypoint: [ "python", "-m", "src.start_queue_processor" ]
build:
context: .
dockerfile: Dockerfile
volumes:
- data:/app/models_data
shm_size: '11gb'
depends_on:
- mongo_metadata_extraction
environment:
- ENVIRONMENT=${ENVIRONMENT:-development}
- SENTRY_DSN=${SENTRY_DSN:-}
network_mode: 'host'
env_file: .env.local
mongo_metadata_extraction:
restart: unless-stopped
command: mongod --port 29017
image: "mongo:7.0.12"
network_mode: 'host'
volumes:
data: