VMWare Ubuntu 22.04, VGPU 510.85.02 - CUDA install fails with Driver/library version mismatch


trying to get CUDA working on VMWare - Ubuntu 22.04, VGPU 14.2 - 510.85.02 deb. Before CUDa install nvidia-smi works.

Whatever CUDA version I install (11.7 deb, 11.8 deb as per nvidia cuda download selector (ubuntu 22.04 deb (local)) I’m getting:
Failed to initialize NVML: Driver/library version mismatch

Which CUDA version do I need to install with the VGPU 510.85.02 driver?
Any specific CuDNN version I need that corresponds with this combo?

here are my steps:

sudo apt install nvidia-linux-grid-510_510.85.02_amd64.deb

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin
sudo mv cuda-ubuntu2204.pin/etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda-repo-ubuntu2204-11-8-local_11.8.0-520.61.05-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2204-11-8-local_11.8.0-520.61.05-1_amd64.deb
sudo cp /var/cuda-repo-ubuntu2204-11-8-local/cuda-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get -y install cuda

$ nvidia-smi
Failed to initialize NVML: Driver/library version mismatch

tried same with CUDA 11.7.. 

Your cuda install messed up your vGPU driver. You want to install CUDA without the driver in this case. I’ve responded to your similar question already with some details. Reinstall your vGPU driver/setup first.

thank you, not sure I get it. So install cuda onto vanilla ubuntu without the grid driver?

Do whatever you need to do to restore your vGPU setup to proper operation - so that the nvidia-smi output does not show an error.

Then install CUDA in your VM without installing any (new) driver as I suggested to you here.