Container client error "NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver"

I have a container client with ubuntu os 18.04. When I install nvidia following install nvidia driver, and I run “nvidia-smi” there is an error “NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.” What’s wrong?

This may be of help:

https://www.youtube.com/watch?v=1i45zTu42i0

nvidia-smi already works by following the video, then is it possible to pass “nvcc” too?