Unable to install NVIDIA driver in P40

Hardware Details:

Model - DELL PowerEdge R730 iDRAC
RAM - 32GB
CPU - 12 Core
Graphics - Tesla P40

I have installed VMware ESXI in the server and I tried creating VM.
The VM is created and GPU is utilised by pass through method.

The following are the things which tested in the Dell server

OS - lubuntu 18.04.5 desktop version, Ubuntu 18.04.6 desktop version, Ubuntu 18.04.6 server version,
Ubuntu 16.04.7 desktop and server versions
CUDA - 10.2, 11.0, 11.2
NVIDIA Driver - 460.32.03, 450.172.01, 460.106.00, 440.118.02

Initially I have installed OS in BIOS mode and later in one of the forum they mentioned to install OS in EFI mode to work on P40 machine

Reference Link : https://forums.developer.nvidia.com/t/issue-with-installing-nvidia-graphics-driver/164329

Then I have booted the OS in EFI mode and I can able to install CUDA in all OS versions but not able to install NVIDIA driver in all the OS and CUDA versions

The error’s which im getting is
In Ubuntu 18.04.6 desktop and server versions and lubuntu OS 18.04.5 desktop version while installing the NVIDIA driver im getting error as

NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. 
Make sure that the latest NVIDIA driver is installed and running

In Ubunut 16.04.7 desktop and server versions while installing the NVIDIA Driver im getting the following error

Log File
nvidia-installer.log (29.7 KB)

Can someone help me to solve this issue

Also I have tried Ubuntu 18.04.5 desktop and server version in EFI Boot option, the VM is not booting up when using EFI option it shows failed to connect

VM_EFI_BOOT

Did you disable nouveau driver? Please check how to disable it before running the NV installer. Instructions how to do this should be found easily.

yes I disabled the nouveau driver after that only I installed cuda and NVIDIA drivers