-
Notifications
You must be signed in to change notification settings - Fork 10
2. Installation
Filip Zorić edited this page May 18, 2024
·
1 revision
To install the Docker engine follow these instructions for installation on Ubuntu.
Besides official instructions, it is now possible to install docker using the following commands:
curl https://get.docker.com | sh \
&& sudo systemctl --now enable docker
On Windows, the Docker engine is not supported. Instead, please follow these instructions to install Docker Desktop:
- Install WSL. WSL is used as the backend for Docker.
- Install Docker Desktop
- (Optional but recommended) Run a demo container as shown here
- You can use Docker with the help of the desktop application or use a command line interface in WSL as you normally would in Linux. Important:
docker
command will not work in WSL if Docker Desktop is not running (at least in the background).
In order to be able to use GPU effectively (assuming you have NVIDIA-GPU which is nowdays prevalent
for deep learning) you need to install nvidia-container-toolkit
.
To use nvidia-container-toolkit, platform requirements are following:
- GNU/Linux x86_64 with kernel version > 3.10
- Docker >= 19.03
- NVIDIA GPU with Architecture >= Kepler (or compute capability 3.0)
- NVIDIA Linux drivers >= 418.81.07
nvidia-container-toolkit
can be installed by executing following commands:
distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \
&& curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
&& curl -s -L https://nvidia.github.io/libnvidia-container/$distribution/libnvidia-container.list | \
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
sudo apt-get update
sudo apt-get install -y nvidia-docker2
sudo systemctl restart docker
Add permissions for X server to enable running GUI applications from docker container:
echo `xhost local:root` >> ~/.bashrc