File size: 741 Bytes
277dec7
 
 
 
1615de2
b2196ce
 
1615de2
277dec7
 
1615de2
b2196ce
1615de2
b2196ce
 
 
 
 
 
fa64dcb
 
b2196ce
 
 
277dec7
 
 
b2196ce
277dec7
 
 
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
FROM python:3.11-slim

WORKDIR /app

# Install system dependencies for onnxruntime and espeak-ng
RUN apt-get update && apt-get install -y --no-install-recommends \
    espeak-ng libespeak-ng1 \
    libgomp1 \
    && rm -rf /var/lib/apt/lists/*

# Install Python dependencies
RUN pip install --no-cache-dir \
    onnxruntime==1.20.0 \
    numpy==1.26.4 \
    soundfile==0.12.1 \
    fastapi==0.115.0 \
    uvicorn[standard]==0.32.0 \
    pydantic==2.9.0 \
    requests==2.32.0 \
    espeakng-loader==0.2.4 \
    phonemizer-fork==3.3.2

# Install kokoro-onnx without deps
RUN pip install --no-cache-dir --no-deps kokoro-onnx==0.5.0

COPY main.py .

ENV PORT=7860
EXPOSE 7860

CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]