![](https://csdnimg.cn/release/download_crawler_static/86358307/bg1.jpg)
1、硬件要求:CPU 8 核以上, 硬盘 1T 以上, GPU 内存 32G,最好配置 2 个 GPU 以上。
2、宿主机安装 Linux Ubuntu 16 版本操作系统
查看 ubuntu 操作系统版本:
lsb_release -a
uname -a
3、宿主机安装 GPU 驱动,确保 nvidia-smi 命令可用。
4、在宿主机安装 docker
(1) sudo apt-get update
(2) sudo apt-get install -y apt-transport-https ca-certificates curl
software-properties-common
(3) curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add
-
(4)
sudo add-apt-repository "deb [arch=amd64]
https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
(5) sudo apt install docker-ce
(6) 安装 nvidia-docker
# If you have nvidia-docker 1.0 installed: we need to remove it and all existing
GPU containers
docker volume ls -q -f driver=nvidia-docker | xargs -r -I{} -n1 docker ps -q -a
-f volume={} | xargs -r docker rm -f
sudo apt-get purge -y nvidia-docker
# Add the package repositories
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | \
sudo apt-key add -
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-do
cker.list | \
sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update