Tt / Dockerfile
Athspi's picture
Update Dockerfile
8bb0c3a verified
raw
history blame contribute delete
556 Bytes
# Dockerfile
FROM python:3.10-slim
# Set working directory
WORKDIR /app
# Install ffmpeg (needed by yt-dlp)
RUN apt-get update && \
apt-get install -y ffmpeg && \
rm -rf /var/lib/apt/lists/*
# Copy requirements
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy app code
COPY app.py .
# Create downloads dir
ENV DOWNLOAD_FOLDER=/tmp/downloads
RUN mkdir -p $DOWNLOAD_FOLDER
# Expose port (HF will override, but good practice)
EXPOSE 7860
# Run with gunicorn
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]