curl -sL https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
#curl -sL https://nvidia.github.io/nvidia-docker/debian10/nvidia-docker.list | sudo tee /etc/apt/sources.list-available/nvidia-docker.list

DEBIAN_VERSION=debian10
ARCH=amd64

cat > /etc/apt/sources.list-available/nvidia-docker.list <<EOF
deb https://nvidia.github.io/libnvidia-container/stable/${DEBIAN_VERSION}/$(ARCH) /
#deb https://nvidia.github.io/libnvidia-container/experimental/${DEBIAN_VERSION}/$(ARCH) /
deb https://nvidia.github.io/nvidia-container-runtime/stable/${DEBIAN_VERSION}/$(ARCH) /
#deb https://nvidia.github.io/nvidia-container-runtime/experimental/${DEBIAN_VERSION}/$(ARCH) /
deb https://nvidia.github.io/nvidia-docker/${DEBIAN_VERSION}/$(ARCH) /
EOF

ln -sf /etc/apt/sources.list-available/nvidia-docker.list /etc/apt/sources.list.d/nvidia-docker.list

# For pre-releases, you need to enable the experimental repos:
#sudo sed -i -e '/experimental/ s/^#//g' /etc/apt/sources.list.d/libnvidia-container.list
#sudo apt-get update

# To disable the experimental repos, you can run:
#sudo sed -i -e '/experimental/ s/^/#/g' /etc/apt/sources.list.d/libnvidia-container.list
#sudo apt-get update


apt-get update
