Solved by ptrblck in post #4 
              
              
                This would mean that the CUDA compiler cannot be used inside the container and thus PyTorch also isn’t built with CUDA support. 
Make sure you can execute nvcc in nvidia/cuda:10.2-cudnn8-runtime-ubuntu18.04 by launching it with nvidia-docker or with the --gpus all argument in newer docker versions. …