-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·101 lines (91 loc) · 2.48 KB
/
docker-compose.yml
File metadata and controls
executable file
·101 lines (91 loc) · 2.48 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
version: '3.8'
services:
flowstate:
build:
context: .
dockerfile: Dockerfile
args:
- BUILDKIT_INLINE_CACHE=1
image: flowstate:2.0-openpose
container_name: flowstate-analyzer
# GPU runtime configuration
runtime: nvidia
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
# Volumes for persistence and data exchange
volumes:
- ./data/input:/data/input:ro
- ./data/output:/app/output:rw
- ./logs:/app/logs:rw
- ./input.mp4:/app/input.mp4:ro
- flowstate-cache:/tmp/flowstate/cache
- ./src/viewer:/app/src/viewer:ro
# Environment configuration
environment:
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
- CUDA_VISIBLE_DEVICES=all
- FLOWSTATE_OUTPUT_DIR=/app/output
- FLOWSTATE_LOG_DIR=/app/logs
- FLOWSTATE_CACHE_DIR=/tmp/flowstate/cache
- FLOWSTATE_TEMP_DIR=/tmp/flowstate
- OMP_NUM_THREADS=4
- OPENCV_VIDEOIO_PRIORITY_FFMPEG=1
- PYTHONUNBUFFERED=1
- LOG_LEVEL=INFO
# Network settings for serving viewer
ports:
- "8080:8080"
# Security and user settings
security_opt:
- no-new-privileges:true
user: flowstate
restart: unless-stopped
# Development viewer service (for quick testing of the viewer)
viewer:
image: python:3.11-slim
container_name: flowstate-viewer
working_dir: /app/output/viewer
volumes:
- ./data/output:/app/output:ro
ports:
- "8000:8000"
command: python -m http.server 8000
profiles:
- dev
# This service is deprecated in favor of the main `flowstate` service's server command.
# It is kept for reference but should not be used for production.
web-server:
build:
context: .
dockerfile: Dockerfile
image: flowstate:2.0-openpose
container_name: flowstate-web-server
volumes:
- ./data/output:/app/output:ro
- ./logs:/app/logs:rw
ports:
- "8081:8080"
environment:
- FLOWSTATE_OUTPUT_DIR=/app/output
- FLOWSTATE_LOG_DIR=/app/logs
- PYTHONUNBUFFERED=1
- LOG_LEVEL=INFO
user: flowstate
restart: unless-stopped
command: server --port 8080 --host 0.0.0.0
profiles:
- production-legacy
# Named volumes for persistence
volumes:
flowstate-cache:
driver: local
# Networks (using default bridge)
networks:
default:
driver: bridge