-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile.intel
More file actions
69 lines (56 loc) · 1.58 KB
/
Dockerfile.intel
File metadata and controls
69 lines (56 loc) · 1.58 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
FROM python:3.11-slim
# Install system dependencies for OpenCV and Intel QSV
RUN apt-get update && apt-get install -y --no-install-recommends \
libgl1 \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender1 \
libgomp1 \
wget \
gnupg \
&& rm -rf /var/lib/apt/lists/*
# Add Intel graphics repository and install VA-API/QSV support
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
intel-media-va-driver-non-free \
libmfx1 \
libva-drm2 \
libva2 \
vainfo \
&& rm -rf /var/lib/apt/lists/* \
|| (apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*)
# Set working directory
WORKDIR /app
# Download go2rtc binary
RUN wget -q https://github.com/AlexxIT/go2rtc/releases/latest/download/go2rtc_linux_amd64 -O /app/go2rtc \
&& chmod +x /app/go2rtc
# Copy requirements first for better caching
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Install the package
RUN pip install --no-cache-dir -e .
# Create videos directory for uploads
RUN mkdir -p /app/videos
# Copy and setup entrypoint
COPY entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
# Expose ports
EXPOSE 8080
EXPOSE 3702/udp
EXPOSE 1984
EXPOSE 8554
EXPOSE 1935
EXPOSE 8555/udp
# Set environment variables
ENV PYTHONUNBUFFERED=1
# Intel QSV/VA-API settings
ENV LIBVA_DRIVER_NAME=iHD
# Default command - start in video upload mode
ENTRYPOINT ["/app/entrypoint.sh"]
CMD ["--source", "video"]