initial comment
This commit is contained in:
221
docker-compose.yml
Normal file
221
docker-compose.yml
Normal file
@@ -0,0 +1,221 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
# Web Dashboard Service
|
||||
dashboard:
|
||||
image: encoderpro:latest
|
||||
container_name: encoderpro-dashboard
|
||||
|
||||
# GPU support (NVIDIA)
|
||||
runtime: nvidia
|
||||
environment:
|
||||
- NVIDIA_VISIBLE_DEVICES=all
|
||||
- NVIDIA_DRIVER_CAPABILITIES=compute,video,utility
|
||||
- DASHBOARD_HOST=0.0.0.0
|
||||
- DASHBOARD_PORT=5000
|
||||
|
||||
# Volume mounts
|
||||
volumes:
|
||||
# Media directories
|
||||
- /mnt/user/movies:/movies:ro
|
||||
- /mnt/user/archive/movies:/archive:ro
|
||||
- /mnt/user/temp/encoderpro-work:/work
|
||||
|
||||
# Configuration and data
|
||||
- ./config.yaml:/config/config.yaml:ro
|
||||
- ./data/db:/db
|
||||
- ./data/logs:/logs
|
||||
|
||||
# Ports
|
||||
ports:
|
||||
- "5000:5000"
|
||||
|
||||
# Resource limits
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
devices:
|
||||
- driver: nvidia
|
||||
count: 1
|
||||
capabilities: [gpu]
|
||||
limits:
|
||||
cpus: '2'
|
||||
memory: 4G
|
||||
|
||||
# Restart policy
|
||||
restart: unless-stopped
|
||||
|
||||
# Run dashboard by default
|
||||
command: ["dashboard"]
|
||||
|
||||
# Logging
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
|
||||
# Health check
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:5000/api/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
|
||||
# One-shot Processing Service (for cron/scheduled runs)
|
||||
processor:
|
||||
image: encoderpro:latest
|
||||
container_name: encoderpro-processor
|
||||
profiles: ["process"] # Enable with: docker-compose --profile process up
|
||||
|
||||
runtime: nvidia
|
||||
environment:
|
||||
- NVIDIA_VISIBLE_DEVICES=all
|
||||
- NVIDIA_DRIVER_CAPABILITIES=compute,video,utility
|
||||
|
||||
volumes:
|
||||
- /mnt/user/movies:/movies
|
||||
- /mnt/user/archive/movies:/archive
|
||||
- /mnt/user/temp/encoderpro-work:/work
|
||||
- ./config.yaml:/config/config.yaml:ro
|
||||
- ./data/db:/db
|
||||
- ./data/logs:/logs
|
||||
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
devices:
|
||||
- driver: nvidia
|
||||
count: 1
|
||||
capabilities: [gpu]
|
||||
limits:
|
||||
cpus: '8'
|
||||
memory: 16G
|
||||
|
||||
# Run once and exit
|
||||
command: ["process"]
|
||||
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
|
||||
# Intel Arc GPU Dashboard
|
||||
dashboard-intel:
|
||||
image: encoderpro-intel:latest
|
||||
container_name: encoderpro-dashboard-intel
|
||||
profiles: ["intel"] # Enable with: docker-compose --profile intel up
|
||||
|
||||
environment:
|
||||
- DASHBOARD_HOST=0.0.0.0
|
||||
- DASHBOARD_PORT=5000
|
||||
- GPU_TYPE=intel
|
||||
|
||||
# Intel GPU device access
|
||||
devices:
|
||||
- /dev/dri:/dev/dri
|
||||
|
||||
volumes:
|
||||
- /mnt/user/movies:/movies:ro
|
||||
- /mnt/user/archive/movies:/archive:ro
|
||||
- /mnt/user/temp/encoderpro-work:/work
|
||||
- ./config-intel.yaml:/config/config.yaml:ro
|
||||
- ./data/db:/db
|
||||
- ./data/logs:/logs
|
||||
|
||||
ports:
|
||||
- "5000:5000"
|
||||
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '2'
|
||||
memory: 4G
|
||||
|
||||
restart: unless-stopped
|
||||
command: ["dashboard"]
|
||||
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:5000/api/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
|
||||
# Intel Arc Processor (for scheduled runs)
|
||||
processor-intel:
|
||||
image: encoderpro-intel:latest
|
||||
container_name: encoderpro-processor-intel
|
||||
profiles: ["intel-process"]
|
||||
|
||||
environment:
|
||||
- GPU_TYPE=intel
|
||||
|
||||
devices:
|
||||
- /dev/dri:/dev/dri
|
||||
|
||||
volumes:
|
||||
- /mnt/user/movies:/movies
|
||||
- /mnt/user/archive/movies:/archive
|
||||
- /mnt/user/temp/encoderpro-work:/work
|
||||
- ./config-intel.yaml:/config/config.yaml:ro
|
||||
- ./data/db:/db
|
||||
- ./data/logs:/logs
|
||||
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '8'
|
||||
memory: 16G
|
||||
|
||||
command: ["process"]
|
||||
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
|
||||
# CPU-only Dashboard (no GPU)
|
||||
dashboard-cpu:
|
||||
image: encoderpro:latest
|
||||
container_name: encoderpro-dashboard-cpu
|
||||
profiles: ["cpu"] # Enable with: docker-compose --profile cpu up
|
||||
|
||||
environment:
|
||||
- DASHBOARD_HOST=0.0.0.0
|
||||
- DASHBOARD_PORT=5000
|
||||
|
||||
volumes:
|
||||
- /mnt/user/movies:/movies:ro
|
||||
- /mnt/user/archive/movies:/archive:ro
|
||||
- /mnt/user/temp/encoderpro-work:/work
|
||||
- ./config-cpu.yaml:/config/config.yaml:ro
|
||||
- ./data/db:/db
|
||||
- ./data/logs:/logs
|
||||
|
||||
ports:
|
||||
- "5000:5000"
|
||||
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '2'
|
||||
memory: 4G
|
||||
|
||||
restart: unless-stopped
|
||||
command: ["dashboard"]
|
||||
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
Reference in New Issue
Block a user