feat: add ffprobe and mkvmerge to docker image + requirements

This commit is contained in:
Louis Heredero 2025-05-04 00:35:54 +02:00
parent 7a3fa8c309
commit be91526c90
Signed by: HEL
GPG Key ID: 8D83DE470F8544E7
2 changed files with 25 additions and 2 deletions

View File

@ -1,7 +1,29 @@
FROM python:3.13.3-alpine
FROM debian:bullseye-slim AS builder
# Install ffmpeg and mkvtoolnix
# but only keep the binaries and libs for ffprobe and mkvmerge
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg mkvtoolnix \
&& mkdir -p /artifacts/bin /artifacts/lib \
&& cp $(which ffprobe) /artifacts/bin/ \
&& cp $(which mkvmerge) /artifacts/bin/ \
&& ldd $(which ffprobe) | awk '{print $3}' | xargs -I '{}' cp -v '{}' /artifacts/lib/ || true \
&& ldd $(which mkvmerge) | awk '{print $3}' | xargs -I '{}' cp -v '{}' /artifacts/lib/ || true
# Must be the same base as builder image for shared libraries compatibility
FROM python:3.13.3-slim-bullseye
COPY --from=builder /artifacts/bin/* /usr/local/bin/
COPY --from=builder /artifacts/lib/* /usr/local/lib/
ENV LD_LIBRARY_PATH=/usr/local/lib
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
CMD ["python3.13", "src/server.py"]
EXPOSE 8000
CMD ["python", "src/server.py"]

1
requirements.txt Normal file
View File

@ -0,0 +1 @@
watchdog==6.0.0