【深度学习 环境安装】在docker上玩深度学习

下面我们在GPU 服务器完成 nvidia-driver, docker 以及 nvidia-docker 安装。

centos7 环境下:

# 安装 CUDA
wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda-repo-rhel7-8-0-local-ga2-8.0.61-1.x86_64-rpm
rpm -i cuda-repo-rhel7-8-0-local-ga2-8.0.61-1.x86_64-rpm
yum install cuda


# 安装 docker
yum install docker

# 安装 nvidia-docker
wget https://github.com/NVIDIA/nvidia/docker/releases/download/v1.0.1/nvidia-docker-1.0.1-1.x86_64.rpm

rpm -i nvidia-docker-1.0.1-1.x86_64.rpm

# 启动 docker 服务
systemctl start docker
systemctl start nvidia-docker

# 下载并启动镜像
sudo nvidia-docker pull hubq/dl4img

使用 Ubuntu16.04

# 安装 CUDA
wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64-deb
sudo dpkg -i cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb
sudo apt-get update
sudo apt-get install cuda

# 安装 docker
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" >/etc/apt/sources.list.d/docker.list
sudo apt-get update
sudo apt-get install docker-engine

# 安装 nvidia-docker
wget -P /tmp https://github.com/NVIDIA/nvidia-docker/releases/download/v1.0.1/nvidia-docker_1.0.1-1_amd64.deb
sudo dpkg -i /tmp/nvidia-docker*.deb && rm /tmp/nvidia-docker*.deb

# 启动 docker 服务
systemctl start docker
systemctl start nvidia-docker

# 下载并启动镜像
sudo nvidia-docker pull hubq/dl4img
已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 编程工作室 设计师:CSDN官方博客 返回首页