File size: 474 Bytes
039b1c4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | FROM python:3.9
# Install ffmpeg for yt-dlp to work correctly (for merging video/audio)
RUN apt-get update && apt-get install -y ffmpeg && rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Create downloads folder
RUN mkdir -p downloads && chmod 777 downloads
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# Expose the port HF expects
EXPOSE 7860
# Run with Gunicorn
CMD ["gunicorn", "-b", "0.0.0.0:7860", "--timeout", "120", "app:app"]
|