-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
66 lines (64 loc) · 2.13 KB
/
docker-compose.dev.yml
File metadata and controls
66 lines (64 loc) · 2.13 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
# Development configuration for docker-compose
#
# Usage:
# First time (builds image, downloads models ~16GB each):
# docker compose -f docker-compose.dev.yml up --build
#
# After editing Python files (fast restart, no rebuild):
# docker compose -f docker-compose.dev.yml restart
#
# View logs:
# docker compose -f docker-compose.dev.yml logs -f
#
# If you change the model (JSON_MODEL_ID or VISION_MODEL_ID), clear the cache:
# docker compose -f docker-compose.dev.yml down -v
# docker compose -f docker-compose.dev.yml up --build
services:
poster-extraction:
build:
context: .
dockerfile: Dockerfile
image: poster-extraction:dev
container_name: poster-extraction-dev
env_file:
- .env
environment:
- CUDA_VISIBLE_DEVICES=${CUDA_VISIBLE_DEVICES:-0}
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
- PORT=8000
- HOST=0.0.0.0
- DATABASE_URL=${DATABASE_URL:-}
- BUNNY_PRIVATE_STORAGE=${BUNNY_PRIVATE_STORAGE:-}
- BUNNY_PRIVATE_STORAGE_KEY=${BUNNY_PRIVATE_STORAGE_KEY:-}
- BUNNY_PUBLIC_STORAGE=${BUNNY_PUBLIC_STORAGE:-}
- BUNNY_PUBLIC_STORAGE_KEY=${BUNNY_PUBLIC_STORAGE_KEY:-}
- POLL_INTERVAL_SECONDS=${POLL_INTERVAL_SECONDS:-30}
- STUCK_PROCESSING_MINUTES=${STUCK_PROCESSING_MINUTES:-5}
ports:
- "${API_PORT:-8000}:8000"
# Mount source code for hot reload - edit locally, restart to apply
volumes:
- ./poster_extraction.py:/app/poster_extraction.py
- ./api.py:/app/api.py
- ./validation.py:/app/validation.py
- ./poster_extraction_schema.json:/app/poster_extraction_schema.json
- ./poster_schema.json:/app/poster_schema.json
# Persist model cache between container rebuilds
- model-cache:/root/.cache
stdin_open: true
tty: true
restart: "no"
deploy:
resources:
limits:
memory: 32G
reservations:
memory: 16G
devices:
- driver: nvidia
count: ${GPU_COUNT:-1}
capabilities: [gpu]
# Named volume for model cache persistence
volumes:
model-cache: