Spaces:
Runtime error
Runtime error
Create Dockerfile
Browse files- Dockerfile +27 -0
Dockerfile
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use an official Python runtime as a parent image
|
2 |
+
FROM python:3.10-slim
|
3 |
+
|
4 |
+
# Set the working directory in the container
|
5 |
+
WORKDIR /app
|
6 |
+
|
7 |
+
# Install ffmpeg, which is a system dependency for moviepy
|
8 |
+
RUN apt-get update && apt-get install -y ffmpeg
|
9 |
+
|
10 |
+
# Copy the requirements file into the container at /app
|
11 |
+
COPY requirements.txt .
|
12 |
+
|
13 |
+
# Install any needed packages specified in requirements.txt
|
14 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
15 |
+
|
16 |
+
# Copy the rest of your application's code into the container at /app
|
17 |
+
# This includes app.py and the 'templates' folder
|
18 |
+
COPY . .
|
19 |
+
|
20 |
+
# Make port 5000 available to the world outside this container
|
21 |
+
EXPOSE 5000
|
22 |
+
|
23 |
+
# Define the command to run your app
|
24 |
+
# We use Gunicorn here for better production performance than 'flask run'
|
25 |
+
# First, install Gunicorn
|
26 |
+
RUN pip install gunicorn
|
27 |
+
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "app:app"]
|