Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Install CUDA, Docker, and Nvidia Docker on a new Paperspace GPU machine
# 1. Install CUDA
echo "Installing CUDA..."
# Only install if CUDA is not already installed.
if ! dpkg-query -W cuda; then
# The 16.04 installer works with 16.10.
curl -O
dpkg -i ./cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
apt-get update
apt-get install cuda -y
# 2. Install Docker-CE
echo "Installing Docker-CE..."
# install packages to allow apt to use a repository over HTTPS:
sudo apt-get -y install \
apt-transport-https ca-certificates curl software-properties-common
# add Docker’s official GPG key:
curl -fsSL | sudo apt-key add -
# set up the Docker stable repository.
sudo add-apt-repository \
"deb [arch=amd64] \
$(lsb_release -cs) \
# update the apt package index:
sudo apt-get -y update
# finally, install docker
sudo apt-get -y install docker-ce
# 3. Install Nvidia-docker
echo "Installing Nvidia-docker..."
sudo dpkg -i nvidia-docker*.deb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment