Skip to content

Latest commit

 

History

History
122 lines (80 loc) · 3.99 KB

installation.md

File metadata and controls

122 lines (80 loc) · 3.99 KB

🛠️ Installation

Summary: This page explains the installation process for the project.

General

Installation scripts are provided in the base folder of the repository (pc_setup_admin.sh and pc_setup_user.sh). How to use these files is briefly described in pc_setup.sh. The installation process in described in further detail here.

To run the project you have to install docker with NVIDIA GPU support, nvidia-docker.

For development, we recommend Visual Studio Code with the plugins that are recommended inside the .vscode folder.

Docker with NVIDIA GPU support

If not yet installed first install docker as described in section Docker with NVIDIA GPU support.

For NVIDIA GPU support it's easiest to follow the guide in the NVIDIA docs.

For simplicity, we list the necessary steps here:

Docker

Install Docker using the convenience script.

curl https://get.docker.com | sh \
 && sudo systemctl --now enable docker

Allow non-root user to execute Docker commands

We recommend this step, to not have to execute every command as root.

# add docker group
sudo groupadd docker

# add your current user to the docker group
sudo usermod -aG docker $USER

After this, restart your system to propagate the group changes.

NVIDIA Container toolkit

Set up the package repository and the GPG key:

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

Install the nvidia-docker2 package (and dependencies) after updating the package listing:

sudo apt-get update
sudo apt-get install -y nvidia-docker2

Restart the Docker daemon to complete the installation after setting the default runtime:

sudo systemctl restart docker

VS Code Extensions

The repository comes with a suite of recommended VS Code extensions. Install them via the Extensions tab inside VS Code.

🚨 Common Problems

Vulkan device not available

Cannot find a compatible Vulkan Device. Try updating your video driver to a more recent version and make sure your video card supports Vulkan.

Vulkan device not available

Verify the issue with the following command:

$ docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi
Failed to initialize NVML: Unknown Error

[!TIP] Solution found in https://stackoverflow.com/a/78137688

sudo vim /etc/nvidia-container-runtime/config.toml

, then changed no-cgroups = false, save

Restart docker daemon:

sudo systemctl restart docker

, then you can test by running

docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi

Based on:

  1. https://bobcares.com/blog/docker-failed-to-initialize-nvml-unknown-error/
  2. https://bbs.archlinux.org/viewtopic.php?id=266915