reels-app/Dockerfile
Sebastjan Artič 30b969e4b8 Initial: reels clipper app
- FastAPI backend (auth, jobs, SSE, download)
- Frontend: drag&drop + YouTube URL + jobs panel
- Pipeline: yt_download → find_chorus → reframe → subtitle
- Modes: track (face follow), center, blur
- Whisper for SI/DE/EN subtitles
- Auto-chorus detection via Whisper + RMS energy
- Docker + Coolify ready
2026-04-28 15:28:22 +00:00

40 lines
981 B
Docker

FROM python:3.11-slim
# System deps: FFmpeg, libs za OpenCV
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
libsm6 \
libxext6 \
libgl1 \
curl \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Python deps
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# App code
COPY app/ ./app/
COPY scripts/ ./scripts/
COPY templates/ ./templates/
COPY static/ ./static/
# Data volume
RUN mkdir -p /data/uploads /data/outputs /data/jobs
VOLUME /data
ENV DATA_DIR=/data
ENV PYTHONUNBUFFERED=1
EXPOSE 8000
# Pre-download Whisper "small" model za faster cold start (opcijsko)
# RUN python -c "from faster_whisper import WhisperModel; WhisperModel('small', device='cpu', compute_type='int8')"
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
CMD curl -fsS http://localhost:8000/healthz || exit 1
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1"]