Upload Dockerfile
Browse files- Dockerfile +9 -7
Dockerfile
CHANGED
@@ -2,33 +2,35 @@
|
|
2 |
FROM pytorch/pytorch:2.5.1-cuda12.1-cudnn9-runtime
|
3 |
|
4 |
ENV PYTHONUNBUFFERED=1 \
|
5 |
-
PIP_DISABLE_PIP_VERSION_CHECK=1
|
|
|
6 |
|
7 |
WORKDIR /app
|
8 |
|
9 |
-
# System deps
|
10 |
RUN apt-get update && \
|
11 |
-
apt-get install -y --no-install-recommends
|
|
|
|
|
12 |
rm -rf /var/lib/apt/lists/*
|
13 |
|
14 |
# Get GPT-SoVITS source
|
15 |
RUN git clone --depth 1 https://github.com/RVC-Boss/GPT-SoVITS.git /app
|
16 |
|
17 |
-
# Python deps
|
18 |
RUN pip install --upgrade pip && \
|
19 |
pip install --no-deps --no-cache-dir -r /app/extra-req.txt && \
|
20 |
pip install --no-cache-dir -r /app/requirements.txt && \
|
21 |
pip install --no-cache-dir fastapi uvicorn soundfile huggingface_hub ffmpeg-python
|
22 |
|
23 |
-
# Pre-download
|
24 |
COPY download_support_models.py /app/download_support_models.py
|
25 |
RUN python /app/download_support_models.py || true
|
26 |
|
27 |
-
#
|
28 |
COPY weights/ /app/pretrained_models/shantianliang/
|
29 |
COPY reference_audio/ /app/reference_audio/
|
30 |
|
31 |
EXPOSE 7860
|
32 |
|
33 |
-
# Start REST API v2 (FastAPI)
|
34 |
CMD ["python", "api_v2.py", "-a", "0.0.0.0", "-p", "7860", "-c", "GPT_SoVITS/configs/tts_infer.yaml"]
|
|
|
2 |
FROM pytorch/pytorch:2.5.1-cuda12.1-cudnn9-runtime
|
3 |
|
4 |
ENV PYTHONUNBUFFERED=1 \
|
5 |
+
PIP_DISABLE_PIP_VERSION_CHECK=1 \
|
6 |
+
PIP_PREFER_BINARY=1
|
7 |
|
8 |
WORKDIR /app
|
9 |
|
10 |
+
# System deps + build toolchain
|
11 |
RUN apt-get update && \
|
12 |
+
apt-get install -y --no-install-recommends \
|
13 |
+
ffmpeg libsox-dev git \
|
14 |
+
build-essential cmake ninja-build pkg-config && \
|
15 |
rm -rf /var/lib/apt/lists/*
|
16 |
|
17 |
# Get GPT-SoVITS source
|
18 |
RUN git clone --depth 1 https://github.com/RVC-Boss/GPT-SoVITS.git /app
|
19 |
|
20 |
+
# Python deps
|
21 |
RUN pip install --upgrade pip && \
|
22 |
pip install --no-deps --no-cache-dir -r /app/extra-req.txt && \
|
23 |
pip install --no-cache-dir -r /app/requirements.txt && \
|
24 |
pip install --no-cache-dir fastapi uvicorn soundfile huggingface_hub ffmpeg-python
|
25 |
|
26 |
+
# Pre-download essentials
|
27 |
COPY download_support_models.py /app/download_support_models.py
|
28 |
RUN python /app/download_support_models.py || true
|
29 |
|
30 |
+
# Your weights & reference audio
|
31 |
COPY weights/ /app/pretrained_models/shantianliang/
|
32 |
COPY reference_audio/ /app/reference_audio/
|
33 |
|
34 |
EXPOSE 7860
|
35 |
|
|
|
36 |
CMD ["python", "api_v2.py", "-a", "0.0.0.0", "-p", "7860", "-c", "GPT_SoVITS/configs/tts_infer.yaml"]
|