Run OpenCL in Docker Containers

After installing the NVIDIA container runtime, you should install all necessary packages:

apt update
apt install ocl-icd-libopencl1 opencl-headers clinfo

Enable OpenCL by:

mkdir -p /etc/OpenCL/vendors
echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd