Jacky2305 commited on
Commit
b2196ce
·
1 Parent(s): 914bb8c

Test: minimal kokoro-onnx install

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -14
Dockerfile CHANGED
@@ -2,25 +2,27 @@ FROM python:3.11-slim
2
 
3
  WORKDIR /app
4
 
5
- # Install system dependencies
6
- RUN apt-get update && apt-get install -y \
7
- libsndfile1 \
8
- espeak-ng \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
- # Install Python dependencies
12
- COPY requirements.txt .
13
- RUN pip install --no-cache-dir -r requirements.txt
 
 
 
 
 
 
 
 
 
 
14
 
15
- # Copy application code
16
  COPY main.py .
17
 
18
- # Expose port
19
  EXPOSE 7860
20
 
21
- # Health check
22
- HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \
23
- CMD curl -f http://localhost:7860/health || exit 1
24
-
25
- # Run the application
26
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
2
 
3
  WORKDIR /app
4
 
5
+ RUN apt-get update && apt-get install -y --no-install-recommends \
6
+ espeak-ng libespeak-ng1 \
 
 
7
  && rm -rf /var/lib/apt/lists/*
8
 
9
+ # Install minimal deps first
10
+ RUN pip install --no-cache-dir \
11
+ onnxruntime==1.16.0 \
12
+ numpy==1.26.4 \
13
+ soundfile==0.12.1 \
14
+ fastapi==0.115.0 \
15
+ uvicorn[standard]==0.32.0 \
16
+ pydantic==2.9.0 \
17
+ requests==2.32.0 \
18
+ espeakng-loader==0.2.4
19
+
20
+ # Install kokoro-onnx without deps
21
+ RUN pip install --no-cache-dir --no-deps kokoro-onnx==0.5.0
22
 
 
23
  COPY main.py .
24
 
25
+ ENV PORT=7860
26
  EXPOSE 7860
27
 
 
 
 
 
 
28
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]