parthraninga commited on
Commit
ad5c95d
·
verified ·
1 Parent(s): 91f29ec

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +38 -34
Dockerfile CHANGED
@@ -1,35 +1,39 @@
1
- # Use a standard Python 3.11 slim image as the base
2
- FROM python:3.11-slim
3
-
4
- # Set the working directory inside the container
5
- WORKDIR /code
6
-
7
- # Set environment variable to prevent interactive prompts during package installation
8
- ENV DEBIAN_FRONTEND=noninteractive
9
-
10
- # Install system-level dependencies:
11
- # - git: for version control (good practice)
12
- # - ffmpeg: required by manim for video processing
13
- # - texlive-full: a full LaTeX distribution for rendering math text
14
- # This is the slowest step.
15
- RUN apt-get update && apt-get install -y --no-install-recommends \
16
- git \
17
- ffmpeg \
18
- texlive-full \
19
- && apt-get clean \
20
- && rm -rf /var/lib/apt/lists/*
21
-
22
- # Copy the requirements file into the container
23
- COPY requirements.txt .
24
-
25
- # Install Python packages specified in requirements.txt
26
- RUN pip install --no-cache-dir --upgrade -r requirements.txt
27
-
28
- # Copy all the application files (app.py, proof.py, etc.) into the container
29
- COPY . .
30
-
31
- # Expose the port Gradio runs on (7860)
32
- EXPOSE 7860
33
-
34
- # The command to run when the container starts: launch the Gradio app
 
 
 
 
35
  CMD ["gradio", "app.py"]
 
1
+ # Use a standard Python 3.11 slim image as the base
2
+ FROM python:3.11-slim
3
+
4
+ # Set the working directory inside the container
5
+ WORKDIR /code
6
+
7
+ # Set environment variable to prevent interactive prompts during package installation
8
+ ENV DEBIAN_FRONTEND=noninteractive
9
+
10
+ # Install system-level dependencies:
11
+ # - git: for version control (good practice)
12
+ # - ffmpeg: required by manim for video processing
13
+ # - texlive-full: a full LaTeX distribution for rendering math text
14
+ # - build-essential, pkg-config, libcairo2-dev: NEW - required to compile pycairo
15
+ # This is the slowest step.
16
+ RUN apt-get update && apt-get install -y --no-install-recommends \
17
+ git \
18
+ ffmpeg \
19
+ texlive-full \
20
+ build-essential \
21
+ pkg-config \
22
+ libcairo2-dev \
23
+ && apt-get clean \
24
+ && rm -rf /var/lib/apt/lists/*
25
+
26
+ # Copy the requirements file into the container
27
+ COPY requirements.txt .
28
+
29
+ # Install Python packages specified in requirements.txt
30
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
31
+
32
+ # Copy all the application files (app.py, proof.py, etc.) into the container
33
+ COPY . .
34
+
35
+ # Expose the port Gradio runs on (7860)
36
+ EXPOSE 7860
37
+
38
+ # The command to run when the container starts: launch the Gradio app
39
  CMD ["gradio", "app.py"]