创建基础镜像的dockerfile文件
FROM nvcr.io/nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu22.04
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/London
RUN apt update && apt install python3-venv -y && apt install python3-pip -y && apt install git -y && apt-get install ffmpeg libsm6 libxext6 -y && apt-get install libgl1 -y && cp /u
sr/bin/python3 /usr/bin/python && git clone https://github.com/Plachtaa/VALL-E-X.git && cd VALL-E-X && pip install -r requirements.txt
CMD sleep 1111111111
#############################################
# 启动镜像后执行运行程序命令(主要是自动下载需要的文件和模型)
python -X utf8 launch-ui.py
# 拷贝数据到本地
docker cp test:VALL-E-X /tools/
docker cp test:/root/.cache /tools/
修改 launch-ui.py
app.launch() ---->app.launch(share=True,server_name="0.0.0.0")
#新的dockerfile
FROM vall:v1
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/London
RUN rm -rf /VALL-E-X
ADD VALL-E-X /VALL-E-X
ADD .cache /root/.cache
CMD sleep 11111111
##################################
使用新的镜像后启动的相关命令 端口 7860
python -X utf8 launch-ui.py