Spaces:
Runtime error
Runtime error
File size: 855 Bytes
603652f |
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 |
# Use an official Python runtime as a parent image
FROM python:3.10-slim
# Set the working directory in the container
WORKDIR /app
# Install ffmpeg, which is a system dependency for moviepy
RUN apt-get update && apt-get install -y ffmpeg
# Copy the requirements file into the container at /app
COPY requirements.txt .
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of your application's code into the container at /app
# This includes app.py and the 'templates' folder
COPY . .
# Make port 5000 available to the world outside this container
EXPOSE 5000
# Define the command to run your app
# We use Gunicorn here for better production performance than 'flask run'
# First, install Gunicorn
RUN pip install gunicorn
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "app:app"] |