Spaces:
Build error
Build error
Update Dockerfile
Browse files- 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 |
-
#
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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"]
|