-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
78 lines (74 loc) · 1.8 KB
/
Copy pathdocker-compose.yml
File metadata and controls
78 lines (74 loc) · 1.8 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
73
74
75
76
77
78
services:
invoice-ocr:
build:
context: .
dockerfile: Dockerfile
args:
- PYTHON_VERSION=3.10
container_name: invoice-ocr-api
ports:
- "8005:8000"
volumes:
- ./src:/app/src
- ./configs:/app/configs
- ./scripts:/app/scripts
- ./data/models:/app/data/models
- ./data/temp:/app/data/temp
- ./data/output:/app/data/output
- ./logs:/app/logs
environment:
- PYTHONUNBUFFERED=1
- PYTHONPATH=/app/src
- CUDA_VISIBLE_DEVICES=0
- PYTORCH_CUDA_ALLOC_CONF=max_split_size_mb:512
- GPU_MEMORY_UTILIZATION=0.9
- MAX_MODEL_LENGTH=4096
- MODEL_NAME=mistral-7b-instruct
- LOG_LEVEL=INFO
- POETRY_VIRTUALENVS_CREATE=false
- POETRY_VIRTUALENVS_IN_PROJECT=false
env_file:
- .env
# Temporarily disabled GPU support
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: 1
# capabilities: [gpu]
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8005/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
redis:
image: redis:7-alpine
container_name: invoice-ocr-redis
ports:
- "6380:6379"
volumes:
- redis_data:/data
restart: unless-stopped
prometheus:
image: prom/prometheus:latest
container_name: invoice-ocr-prometheus
ports:
- "9090:9090"
volumes:
- ./monitoring/prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus
restart: unless-stopped
volumes:
redis_data:
prometheus_data:
networks:
default:
driver: bridge