1、从codewithgpu拉取sovits镜像
docker pull registry.cn-beijing.aliyuncs.com/codewithgpu2/rvc-boss-gpt-sovits:gpM1WfbTsA |
2、安装nvidia-container-toolkit,让docker容器可以使用GPU资源
配置生产仓库
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ |
更新软件源
sudo apt-get update |
安装 NVIDIA 容器工具包
sudo apt-get install -y nvidia-container-toolkit |
重启docker
sudo systemctl restart docker |
3、创建sovits容器,设置启动GPU,设置端口号、以及共享内存大小
以非持久化存储方式创建
docker run -id --name=sovits --gpus all -p 9874:9874 -p 9873:9873 -p 9872:9872 -p 9871:9871 --shm-size 7g registry.cn-beijing.aliyuncs.com/codewithgpu2/rvc-boss-gpt-sovits:gpM1WfbTsA |
以持久化存储方式创建(volume挂载)
docker run -id --name=sovits --gpus all -p 9874:9874 -p 9873:9873 -p 9872:9872 -p 9871:9871 --shm-size 7g -v /home/panzhe/sovits_docker_v/logs:/root/GPT-SoVITS/logs -v /home/panzhe/sovits_docker_v/audio_data:/root/GPT-SoVITS/audio_data -v /home/panzhe/sovits_docker_v/output:/root/GPT-SoVITS/output -v /home/panzhe/sovits_docker_v/GPT_weights_v2:/root/GPT-SoVITS/GPT_weights_v2 -v /home/panzhe/sovits_docker_v/SoVITS_weights_v2:/root/GPT-SoVITS/SoVITS_weights_v2 registry.cn-beijing.aliyuncs.com/codewithgpu2/rvc-boss-gpt-sovits:gpM1WfbTsA |
4、启动gpt-sovits服务
echo {}> ~/GPT-SoVITS/i18n/locale/en_US.json && source activate GPTSoVits && cd ~/GPT-SoVITS/ && python webui.py zh_C |
查看GPU使用情况
watch -n 1 nvidia-smi |
-n 1代表每隔1秒刷新一次,ctrl+c退出。