Skip to content

0.0 Setting up X11 and nvidia GPU support

Rudolph Pienaar edited this page Jun 19, 2020 · 3 revisions

Setting up X11 and nvidia GPU support

Abstract

This page describes how to run GUI X11 (and GPU) apps from the pl-fshack container.

Install the nvidia-docker runtime

Note that these instructions have been tested/verified on pl-fshack running on a base Ubuntu 20.04 image, as well as an Ubuntu 20.04 host.

The following site refers: https://devblogs.nvidia.com/gpu-containers-runtime

docker volume ls -q -f driver=nvidia-docker           |\
       xargs -r -I{} -n1 docker ps -q -a -f volume={} |\
       xargs -r docker rm -f
sudo apt-get purge -y nvidia-docker
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey |\
    sudo apt-key add -
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
# Make sure that this string starts with `ubuntu`, i.e.
#    ubuntu20.04
# A distribution like pop20.04 will result in an error.
# If necessary, set the string manually
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | \
     sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt update
sudo apt nvidia-docker2
sudo pkill -SIGHUP dockerd
Clone this wiki locally