-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (24 loc) · 969 Bytes
/
Copy pathDockerfile
File metadata and controls
31 lines (24 loc) · 969 Bytes
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
FROM nvcr.io/nvidia/cuda:12.8.0-cudnn-runtime-ubuntu24.04
RUN apt-get update -y && \
apt-get install -y python3.10 python3-venv espeak-ng espeak-ng-data \
libsndfile1 ffmpeg curl && \
apt-get clean && rm -rf /var/lib/apt/lists/* && \
mkdir -p /usr/share/espeak-ng-data && \
ln -s /usr/lib/*/espeak-ng-data/* /usr/share/espeak-ng-data/ && \
curl -LsSf https://astral.sh/uv/install.sh | sh && \
mv /root/.local/bin/uv /usr/local/bin/
WORKDIR /app
COPY pyproject.toml .
RUN uv venv --python 3.10 && uv sync --extra gpu --no-cache
COPY main.py download_model.py entrypoint.sh ./
RUN chmod +x entrypoint.sh
ENV PATH="/app/.venv/bin:$PATH" \
PYTHONUNBUFFERED=1 \
TORCH_CUDA_ARCH_LIST="8.9;12.0" \
PHONEMIZER_ESPEAK_PATH=/usr/bin \
PHONEMIZER_ESPEAK_DATA=/usr/share/espeak-ng-data \
ESPEAK_DATA_PATH=/usr/share/espeak-ng-data \
MODEL_DIR=/app/models \
VOICES_DIR=/app/voices
EXPOSE 8880
CMD ["./entrypoint.sh"]