以下以centos 7 为🌰
安装常用的软件 可跳过
yum install zsh vim git
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
安装docker和 nvidia-docker
curl -fsSL https://get.docker.com -o get-docker.sh
chmod 777 get-docker.sh
./get-docker.sh
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.repo | \
sudo tee /etc/yum.repos.d/nvidia-docker.repo
sudo yum install -y nvidia-docker2
sudo pkill -SIGHUP dockerd
安装nvidia驱动,重启系统
sudo yum install nvidia-x11-drv
sudo reboot
安装tensorflow-gpu-py3-jupyter镜像
docker run --runtime=nvidia -it -p 8888:8888 -v /home:/home tensorflow/tensorflow:latest-gpu-py3-jupyter
打完收工
网友评论