-
Notifications
You must be signed in to change notification settings - Fork 488
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (25 loc) · 960 Bytes
/
Dockerfile
File metadata and controls
33 lines (25 loc) · 960 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
# Containerfile for PySceneDetect
# Copyright (C) 2026 FNGarvin. All rights reserved.
# License: BSD-3-Clause
FROM python:3.11.11-slim
# Create a non-root user for security hardening
RUN useradd -m scenedetect
# Set working directory and copy files with correct ownership
WORKDIR /app
COPY --chown=scenedetect:scenedetect . .
# Install necessary system dependencies as root first
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ffmpeg \
mkvtoolnix && \
rm -rf /var/lib/apt/lists/*
# Install PySceneDetect with headless OpenCV and other optional media backends
# pyav is highly recommended for faster/more robust video decodes
# moviepy provides an alternative video splitting backend
RUN --mount=type=cache,target=/root/.cache/pip \
pip install ".[opencv-headless,pyav,moviepy]"
# Switch to the non-root user
USER scenedetect
# The default behavior is to run the CLI
ENTRYPOINT ["scenedetect"]
# EOF Dockerfile