We have a fresh system, let’s install Docker. Here we are using CentOS 7.5 and logged in as root. First make sure your date/clock is correct, if not, fix:
1 2 3 |
date +%Y%m%d -s "20180917" date +%T -s "13:39:00" hwclock -w |
Install Docker
1 2 3 4 5 |
yum install -y yum-utils yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo yum install -y docker-ce systemctl start docker systemctl enable docker |
Install NVIDIA Docker
1 2 3 |
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 |
Following the README we do:
1 2 3 4 5 6 |
# Install nvidia-docker2 and reload the Docker daemon configuration sudo yum install -y nvidia-docker2 sudo pkill -SIGHUP dockerd # Test nvidia-smi with the latest official CUDA image docker run --runtime=nvidia --rm nvidia/cuda nvidia-smi |
The output of this command should give you something like the following:…