'Cuda is not detected when building in Dockerfile

I'm using nvidia/cuda:10.2-cudnn8-devel-ubuntu18.04 as the base image.

Trying to build with nvidia-docker, and Dockerfile doesn't detect cuda when building.

Any ideas how to solve this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source