File size: 749 Bytes
f994fea 65edd82 f994fea a1a36a1 f994fea 4973717 f994fea 4973717 a1a36a1 f994fea a1a36a1 f994fea 4973717 a1a36a1 f994fea a1a36a1 f994fea 5d10b61 a1a36a1 f994fea ca80fca a1a36a1 f994fea ca80fca |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# Use an updated, secure Python image
FROM python:3.10-slim-bullseye
# Prevent interactive prompts during package installs
ENV DEBIAN_FRONTEND=noninteractive
# 1. Install FFmpeg and any essential system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends ffmpeg && \
rm -rf /var/lib/apt/lists/*
# 2. Set working directory
WORKDIR /app
# 3. Copy requirements first (better caching)
COPY requirements.txt /app/requirements.txt
# 4. Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# 5. Copy your Flask application file
COPY app.py /app/
# 6. Expose the port
EXPOSE 7860
# 7. Command to run your app via Gunicorn
CMD exec gunicorn --bind 0.0.0.0:7860 --workers 2 app:ffmpeg_app
|