theminji commited on
Commit
a8f952f
·
verified ·
1 Parent(s): 5e84299

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -16
Dockerfile CHANGED
@@ -1,34 +1,26 @@
1
- # Use an official Python runtime as a parent image.
2
  FROM python:3.9-slim
3
 
4
- # Install system dependencies for Manim and for building pycairo:
5
  RUN apt-get update && apt-get install -y \
6
- build-essential \ # Installs gcc, g++, make, etc.
7
- pkg-config \ # Needed for configuring build of C libraries
8
- python3-dev \ # Python header files
9
- ffmpeg \ # For video processing
10
- libcairo2-dev \ # Cairo development files
11
- libpango1.0-dev \ # Pango development files
12
- libpangocairo-1.0-0 \ # Pango Cairo binding runtime (optional)
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
- # Set the working directory in the container.
16
  WORKDIR /app
17
 
18
- # Copy requirements.txt into the container.
19
  COPY requirements.txt .
20
 
21
- # Install Python dependencies (including Manim and its dependencies).
22
  RUN pip install --no-cache-dir -r requirements.txt
23
 
24
- # Copy the rest of your application code into the container.
25
  COPY . .
26
 
27
- # Expose the port expected by Hugging Face Spaces.
28
  EXPOSE 7860
29
 
30
- # Set the Flask app environment variable.
31
  ENV FLASK_APP=app.py
32
 
33
- # Start the Flask application.
34
  CMD ["python", "app.py"]
 
 
1
  FROM python:3.9-slim
2
 
3
+ # Install system dependencies for building pycairo and for Manim
4
  RUN apt-get update && apt-get install -y \
5
+ build-essential \
6
+ pkg-config \
7
+ python3-dev \
8
+ ffmpeg \
9
+ libcairo2-dev \
10
+ libpango1.0-dev \
11
+ libpangocairo-1.0-0 \
12
  && rm -rf /var/lib/apt/lists/*
13
 
 
14
  WORKDIR /app
15
 
 
16
  COPY requirements.txt .
17
 
 
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
 
20
  COPY . .
21
 
 
22
  EXPOSE 7860
23
 
 
24
  ENV FLASK_APP=app.py
25
 
 
26
  CMD ["python", "app.py"]