ubuntu安装docker一整套流程

ubuntu安装docker一整套流程

包含添加sudo权限、安装nvidia-docker等

docker安装
https://www.jianshu.com/p/da1c7dc4217a

docker添加sudo权限
https://www.jianshu.com/p/1354e0506753

安装nvidia-docker

curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
curl -s -L https://nvidia.github.io/nvidia-docker/ubuntu18.04/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update
sudo apt-get install nvidia-docker2
sudo pkill -SIGHUP dockerd

运行以下命令测试,没报错说明安装完成

sudo nvidia-docker run --rm nvidia/cuda:10.1-devel nvidia-smi

你可能感兴趣的:(docker,ubuntu,容器)