Error in exec nvidia-smi after executing docker run --gpus all

Hey guys,
The OS is centOS7.9 and when I executed nvidia-smi on system,it’s good.everything is fine.
Then I executed " docker run -it --gpus all /bin/bash" and executed nvidia-smi on it.

Error occurred:NVIDIA-SMI couldn’t find library in your system. Please make sure that the NVIDIA Display Driver is properly installed and present in your system.

Please also try adding directory that contains to your system PATH.
I had reinstalled cuda times and change the torch version in images but still like this, and torch.cuda.is_available() still returned False.

So maybe u guys had any solution?

Have you tried to search for the error message? I found this: NVIDIA-SMI couldn't find library in your system · Issue #1163 · NVIDIA/nvidia-docker · GitHub

I searched for “NVIDIA-SMI couldn’t find library in your system

Unfortunately I don’t have NVIDIA on my Linux machines to try