ubuntu18.04にDockerをインストールする手順
Docker
~$ sudo apt-get update && \ sudo apt-get install -y \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common
~$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
~$ sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable"
NVIDA Docker
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/$(. /etc/os-release;echo $ID$VERSION_ID)/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list ~$ sudo apt update
~$ sudo apt install -y nvidia-container-toolkit
~$ sudo systemctl restart docker
sudoなしでDockerを使用する
~$ sudo groupadd docker ~$ sudo usermod -aG docker $USER ~$ sudo systemctl enable docker ~$ sudo systemctl start docker
~$ reboot