| FROM python:3.9-slim |
|
|
| RUN apt-get update && apt-get install -y \ |
| ffmpeg git cmake build-essential \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| WORKDIR /app |
|
|
| |
| RUN git clone --depth 1 https://github.com/RVC-Boss/GPT-SoVITS.git . |
|
|
| |
| |
| RUN sed -i 's/9874/7860/g' webui.py && \ |
| |
| sed -i 's/is_half = True/is_half = False/g' config.py && \ |
| sed -i 's/device = "cuda"/device = "cpu"/g' config.py |
|
|
| |
| RUN pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu |
| RUN pip install --no-cache-dir -r requirements.txt |
| RUN pip install --no-cache-dir underthesea |
|
|
| |
| RUN mkdir -p GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large && \ |
| git clone --depth 1 https://huggingface.co/hfl/chinese-roberta-wwm-ext-large /tmp/roberta && \ |
| cp -r /tmp/roberta/* GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large/ && \ |
| rm -rf /tmp/roberta |
|
|
| |
| ENV webui_port=7860 |
| ENV device=cpu |
| ENV is_half=False |
|
|
| EXPOSE 7860 |
|
|
| |
| CMD ["python", "api.py","api_2.py" "-a", "0.0.0.0", "-p", "7860"] |