Issue with installing NVIDIA drivers in AWS

When installing NVIDIA drivers to AWS EC2 instances (NVIDIA drivers for your Amazon EC2 instance - Amazon Elastic Compute Cloud), ‘nvidia-smi’ is producing error:

# nvidia-smi

NVIDIA-SMI couldn’t find libnvidia-ml.so 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 libnvidia-ml.so to your system PATH.

Driver Version: 570.172.08

OS: RHEL 8