-
-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (33 loc) · 1.69 KB
/
Dockerfile
File metadata and controls
40 lines (33 loc) · 1.69 KB
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
40
FROM python:3.10-bullseye
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
apt-get update --fix-missing && apt-get upgrade -y && \
apt-get install -y --fix-missing --no-install-recommends git build-essential gcc g++ portaudio19-dev ffmpeg libportaudio2 libasound-dev python3 python3-pip gcc wget curl && \
apt-get clean && rm -rf /var/lib/apt/lists/* && \
python3 -m pip install --upgrade pip --no-cache-dir
WORKDIR /app
# Install PyTorch CPU version
RUN pip install torch==2.6.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cpu --no-cache-dir
# Install numpy and Cython for pkuseg (required by chatterbox-tts)
RUN pip install numpy==1.25.2 Cython "setuptools>=78.1.1" --no-cache-dir
# Install pkuseg separately (required by chatterbox-tts)
RUN pip install pkuseg==0.0.25 --no-build-isolation --no-cache-dir
COPY requirements.txt .
RUN --mount=type=cache,target=/root/.cache/pip,sharing=locked \
python3 -m pip install --no-cache-dir -r requirements.txt
# Install chatterbox-tts with --no-deps to bypass transformers==4.46.3 pin
# This allows us to use transformers>=4.53.0 for security fixes
RUN pip install chatterbox-tts --no-deps --no-cache-dir
# Install esp-ppq with --no-deps to bypass onnx<1.18.0 pin
# This allows us to use onnx>=1.21.0 for security fixes
RUN pip install esp-ppq --no-deps --no-cache-dir
# Install xllamacpp CPU version
RUN pip install xllamacpp==2026.6.9538 --force-reinstall --no-cache-dir
COPY . .
ENV HOST=0.0.0.0 \
TOKENIZERS_PARALLELISM=false \
PYTHONUNBUFFERED=1 \
HF_HOME=/app/models \
HF_HUB_CACHE=/app/models
EXPOSE 8091
# Use start.py which runs precache once, then starts uvicorn workers
CMD ["python", "start.py"]