Update Dockerfile
Browse files- Dockerfile +31 -23
Dockerfile
CHANGED
@@ -1,23 +1,31 @@
|
|
1 |
-
# Use an official Python runtime as a parent image.
|
2 |
-
FROM python:3.9-slim
|
3 |
-
|
4 |
-
#
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use an official Python runtime as a parent image.
|
2 |
+
FROM python:3.9-slim
|
3 |
+
|
4 |
+
# Install system dependencies for Manim.
|
5 |
+
RUN apt-get update && apt-get install -y \
|
6 |
+
ffmpeg \
|
7 |
+
libcairo2 \
|
8 |
+
libpango-1.0-0 \
|
9 |
+
libpangocairo-1.0-0 \
|
10 |
+
&& rm -rf /var/lib/apt/lists/*
|
11 |
+
|
12 |
+
# Set the working directory in the container.
|
13 |
+
WORKDIR /app
|
14 |
+
|
15 |
+
# Copy requirements.txt into the container.
|
16 |
+
COPY requirements.txt .
|
17 |
+
|
18 |
+
# Install Python dependencies (including Manim).
|
19 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
20 |
+
|
21 |
+
# Copy the rest of your application code into the container.
|
22 |
+
COPY . .
|
23 |
+
|
24 |
+
# Expose the port expected by Hugging Face Spaces.
|
25 |
+
EXPOSE 7860
|
26 |
+
|
27 |
+
# Set the Flask app environment variable.
|
28 |
+
ENV FLASK_APP=app.py
|
29 |
+
|
30 |
+
# Start the Flask application.
|
31 |
+
CMD ["python", "app.py"]
|