File size: 1,137 Bytes
d9486d1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Start with a Python base image
FROM python:3.11-slim

# Set working directory
WORKDIR /app

# Install system dependencies for Manim
# This is a large installation and will take time
RUN apt-get update && apt-get install -y --no-install-recommends \
    ffmpeg \
    texlive-full \
    pango1.0-tools \
    libcairo2-dev \
    libjpeg-dev \
    libgif-dev \
    libpango1.0-dev \
    libsdl-pango-dev \
    portaudio19-dev \
    git \
    && rm -rf /var/lib/apt/lists/*

# Copy the entire project into the container
COPY . .

# Install Python requirements
# Manim is included in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

# Download Kokoro TTS models during the build process
RUN mkdir -p models && \
    wget -P models https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files/kokoro-v0_19.onnx && \
    wget -P models https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files/voices.bin

# Expose the port the API will run on (e.g., 7860 for Gradio/FastAPI)
EXPOSE 7860

# Command to run the application
# We will use Gradio to create the UI endpoint
CMD ["python", "app.py"]