Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
125 lines (120 loc) · 3.88 KB
/
Copy pathdocker-compose.yml
File metadata and controls
125 lines (120 loc) · 3.88 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# Docker Compose for neTV
#
# Build:
# docker compose build # Default (optimized FFmpeg)
# FFMPEG_IMAGE=ubuntu:24.04 docker compose build # Alternative (apt FFmpeg)
#
# Run:
# docker compose up -d # Auto-detects hardware (Intel/AMD)
# docker compose --profile nvidia up -d # NVIDIA GPU (driver 580+, Turing+)
#
# NVIDIA with older drivers/GPUs (see README for driver/compute compatibility):
# FFMPEG_IMAGE=ghcr.io/jvdillon/netv-ffmpeg:cuda12.8 docker compose --profile nvidia up -d
#
# Local CUDA 12.4 FFmpeg build (from Dockerfile.ffmpeg):
# docker build --progress plain --build-arg NVIDIA=cuda:12.4 --build-arg FFMPEG_BASE_IMAGE=ubuntu:22.04 -f Dockerfile.ffmpeg -t netv-ffmpeg:cuda12.4 .
# FFMPEG_IMAGE=netv-ffmpeg:cuda12.4 docker compose --profile nvidia build
# FFMPEG_IMAGE=netv-ffmpeg:cuda12.4 docker compose --profile nvidia up -d
#
# No GPU or /dev/dri? Comment out the 'devices' section below.
services:
netv:
build:
context: .
args:
FFMPEG_IMAGE: ${FFMPEG_IMAGE:-ghcr.io/jvdillon/netv-ffmpeg:latest}
image: netv
container_name: netv
ports:
- "${NETV_PORT:-8000}:8000"
environment:
- NETV_PORT=8000
- NETV_HTTPS=${NETV_HTTPS:-}
- LOG_LEVEL=INFO # DEBUG for verbose logging
volumes:
- ./cache:/app/cache
- /etc/localtime:/etc/localtime:ro # Use host timezone for EPG
# For HTTPS, also mount your certificates:
# - /etc/letsencrypt:/etc/letsencrypt:ro
# Use system RAM instead of using local storage to store transcodes
# - /dev/shm:/tmp
restart: unless-stopped
# Hardware acceleration (Intel/AMD) - comment out if no /dev/dri
devices:
- /dev/dri:/dev/dri
# Xtream-compatible endpoint for native IPTV players.
netv-gateway:
build:
context: .
dockerfile: Dockerfile.gateway
image: netv-gateway
container_name: netv-gateway
ports:
- "${NETV_GATEWAY_PORT:-8100}:8100"
environment:
- NETV_MODE=gateway
- NETV_GATEWAY_PORT=8100
- NETV_GATEWAY_PUBLIC_URL=${NETV_GATEWAY_PUBLIC_URL:-}
- NETV_GATEWAY_TRUSTED_PROXIES=${NETV_GATEWAY_TRUSTED_PROXIES:-127.0.0.1}
- LOG_LEVEL=INFO
volumes:
- ./cache:/app/cache
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
healthcheck:
test:
- CMD
- python3
- -c
- "import urllib.request; r=urllib.request.urlopen('http://localhost:8100/healthz', timeout=5); exit(0 if r.status==200 else 1)"
interval: 30s
timeout: 10s
start_period: 10s
retries: 3
# NVIDIA-capable gateway on the standard port. It follows the AI Upscale
# setting from the web UI and uses passthrough when no model is selected.
# Stop netv-gateway before starting this alternative service.
netv-gateway-upscale:
build:
context: .
dockerfile: Dockerfile.ai_upscale
image: netv-ai-upscale
container_name: netv-gateway
profiles:
- upscale
ports:
- "${NETV_GATEWAY_PORT:-8100}:8100"
environment:
- NETV_MODE=gateway
- NETV_GATEWAY_PORT=8100
- NETV_GATEWAY_PUBLIC_URL=${NETV_GATEWAY_PUBLIC_URL:-}
- NETV_GATEWAY_TRUSTED_PROXIES=${NETV_GATEWAY_TRUSTED_PROXIES:-127.0.0.1}
- LOG_LEVEL=INFO
volumes:
- ./cache:/app/cache
- netv-models:/models
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
# NVIDIA GPU: docker compose --profile nvidia up -d
netv-nvidia:
extends:
service: netv
container_name: netv
profiles:
- nvidia
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
volumes:
netv-models: