theminji commited on
Commit
6795b32
·
verified ·
1 Parent(s): 55191e0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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
- # Set the working directory in the container.
5
- WORKDIR /app
6
-
7
- # Copy requirements.txt into the container at /app.
8
- COPY requirements.txt .
9
-
10
- # Install any needed packages specified in requirements.txt.
11
- RUN pip install --no-cache-dir -r requirements.txt
12
-
13
- # Copy the rest of the code into the container at /app.
14
- COPY . .
15
-
16
- # Expose the port that Flask uses. (Hugging Face Spaces usually expects port 7860, but for Flask default port 5000 is common)
17
- EXPOSE 7860
18
-
19
- # Define environment variable for Flask (optional)
20
- ENV FLASK_APP=app.py
21
-
22
- # Run the command to start your app.
23
- CMD ["python", "app.py"]
 
 
 
 
 
 
 
 
 
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"]