git地址 https://github.com/DAI-Lab/RivaGAN
Dockerfile (/tools下文件为git下的文件)
###############################################
# 使用 NVIDIA CUDA 10.0 开发环境作为基础镜像
FROM kaldiasr/kaldi:gpu-ubuntu18.04-cuda10.0
# 设置非交互式安装模式以避免某些命令在构建过程中暂停
ENV DEBIAN_FRONTEND=noninteractive
# 更新软件包列表
RUN apt-get update
# 安装 Python 3.6 和 pip
RUN apt-get install -y software-properties-common
RUN apt-get install -y wget
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt-get install -y python3.6 && apt-get install python3-pip -y && apt install git -y && apt-get install ffmpeg libsm6 libxext6 -y && apt-get install libgl1 -y
# 设置默认的 python 指令为 python3.6
RUN cp /usr/bin/python3.6 /usr/bin/python
RUN cp /usr/bin/pip3 /usr/bin/pip
RUN pip install tqdm
ADD tools /tools
RUN cd /tools/RivaGAN && make install
RUN pip3 install -U https://download.pytorch.org/whl/cu100/torch-1.0.0-cp36-cp36m-linux_x86_64.whl
# 清理缓存以减小镜像体积
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# 设置工作目录(可根据需要更改)
WORKDIR /tools
# (可选)设置容器启动时执行的命令
CMD sleep 1111111111
################################
建议使用525的驱动
wget https://us.download.nvidia.com/XFree86/Linux-x86_64/525.105.17/NVIDIA-Linux-x86_64-525.105.17.run