- Dockerfile: add libmpv.so + libsndfile.so symlinks (Alpine/musl has no ldconfig) - engine.py: monkey-patch ctypes.util.find_library as fallback for Alpine - audio.py: add /upload (multipart) and /files endpoints - pyproject.toml: add python-multipart - frontend: replace path input with upload button + file selector dropdown
22 lines
465 B
Docker
22 lines
465 B
Docker
FROM python:3.11-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
# Audio stack: libmpv for python-mpv, ffmpeg for MP3 waveform, libsndfile for soundfile
|
|
RUN apk add --no-cache \
|
|
mpv-libs \
|
|
ffmpeg \
|
|
ffmpeg-libs \
|
|
libsndfile && \
|
|
ln -sf /usr/lib/libmpv.so.2 /usr/lib/libmpv.so && \
|
|
ln -sf /usr/lib/libsndfile.so.1 /usr/lib/libsndfile.so
|
|
|
|
COPY pyproject.toml .
|
|
RUN pip install --no-cache-dir .
|
|
|
|
COPY lightsync/ lightsync/
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["python", "-m", "lightsync"]
|