Start Here : Installation and Setup
Quick start guide on how-to use nvidia-docker with Linux to mine cryptocurrency
System Requirements
  • Ubuntu Linux 16.04 or 18.04
  • NVIDIA Graphics Card / Modern CPU

Install NVIDIA drivers

1
sudo add-apt-repository -y ppa:graphics-drivers/ppa
2
sudo apt-get update
3
sudo apt-get -y install $(ubuntu-drivers list | sort | uniq | tail -n1)
Copied!
The command ubuntu-drivers will return the latest drivers once you have updated the repository
Reboot your system now!

Install Docker

We must first install Docker to the target system
1
sudo apt-get -y remove docker docker-engine docker.io containerd runc
2
sudo apt-get -y install \
3
apt-transport-https \
4
ca-certificates \
5
curl \
6
gnupg-agent \
7
software-properties-common
8
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
9
sudo add-apt-repository -y \
10
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
11
$(lsb_release -cs) \
12
stable"
13
sudo apt-get update
14
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
Copied!

Install Docker-Compose

Used to help orchestrate multiple docker containers in the future
1
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
2
sudo chmod +x /usr/local/bin/docker-compose
Copied!
Post Installation Steps
Most likely required for your system if you are not "root" / home users
1
sudo groupadd docker
2
sudo usermod -aG docker $USER
3
sudo chown "$USER":"$USER" /home/"$USER"/.docker -R
4
sudo chmod g+rwx "$HOME/.docker" -R
Copied!
You have now installed Docker on your system! Now we can install nvidia-docker

Install nvidia-docker

Once you're strong enough, save the world:
1
# If you have nvidia-docker 1.0 installed: we need to remove it and all existing GPU containers
2
docker volume ls -q -f driver=nvidia-docker | xargs -r -I{} -n1 docker ps -q -a -f volume={} | xargs -r docker rm -f
3
sudo apt-get purge -y nvidia-docker
4
5
# Add the package repositories
6
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | \
7
sudo apt-key add -
8
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
9
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | \
10
sudo tee /etc/apt/sources.list.d/nvidia-docker.list
11
sudo apt-get update
12
13
# Install nvidia-docker2 and reload the Docker daemon configuration
14
sudo apt-get install -y nvidia-docker2
15
sudo pkill -SIGHUP dockerd
16
Copied!
Reboot your system now!

All in One Installer

1
sudo add-apt-repository -y ppa:graphics-drivers/ppa
2
sudo apt-get update
3
sudo apt-get -y install $(ubuntu-drivers list | sort | uniq | tail -n1)
4
5
#Reboot Recommended Here
6
7
sudo apt-get -y remove docker docker-engine docker.io containerd runc
8
sudo apt-get -y install \
9
apt-transport-https \
10
ca-certificates \
11
curl \
12
gnupg-agent \
13
software-properties-common
14
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
15
sudo add-apt-repository -y \
16
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
17
$(lsb_release -cs) \
18
stable"
19
sudo apt-get update
20
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
21
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
22
sudo chmod +x /usr/local/bin/docker-compose
23
sudo groupadd docker
24
sudo usermod -aG docker $USER
25
sudo chown "$USER":"$USER" /home/"$USER"/.docker -R
26
sudo chmod g+rwx "$HOME/.docker" -R
27
28
#Reboot Recommended Here
29
30
# If you have nvidia-docker 1.0 installed: we need to remove it and all existing GPU containers
31
docker volume ls -q -f driver=nvidia-docker | xargs -r -I{} -n1 docker ps -q -a -f volume={} | xargs -r docker rm -f
32
sudo apt-get purge -y nvidia-docker
33
34
# Add the package repositories
35
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | \
36
sudo apt-key add -
37
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
38
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | \
39
sudo tee /etc/apt/sources.list.d/nvidia-docker.list
40
sudo apt-get update
41
42
# Install nvidia-docker2 and reload the Docker daemon configuration
43
sudo apt-get install -y nvidia-docker2
44
sudo pkill -SIGHUP dockerd
45
46
#Reboot Recommended Here
Copied!
Last modified 3yr ago