-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
37 lines (35 loc) · 973 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
37 lines (35 loc) · 973 Bytes
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
# Video Analysis Pro — Docker Compose
# CPU: docker compose up analy
# GPU: docker compose --profile gpu up analyzer
services:
analyzer:
build: .
image: video-analysis-pro:latest
ports:
- "8000:8000"
environment:
- VAP_PORT=8000
- VAP_MAX_UPLOAD_MB=512
# 生产强制鉴权:不配 VAP_HEADLESS_TOKEN 时 /analyze 公网裸奔(audit-blinds P1-2)。
# 部署前必须在 .env 设一个强随机 token,调用方带 Authorization: Bearer <token>。
- VAP_HEADLESS_TOKEN=${VAP_HEADLESS_TOKEN:-}
volumes:
- vap-data:/data
restart: unless-stopped
analyzer-gpu:
extends:
service: analyzer
image: video-analysis-pro:cuda
build:
context: .
dockerfile: Dockerfile.cuda
profiles: ["gpu"]
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
volumes:
vap-data: