How to force driver installation without a NVIDIA GPU on Ubuntu server?

I have a project I need to test for compilation on a ppc64le emulator. I don’t need to execute the code, just the compilation part. I’ve managed to get the compiler installed but the compilation failed with many cu functions throwing undefined function error (such as undefined reference to ‘cudaGetErrorString’). It seems the driver will install some additional parts to make the program compile. So how do I force the installation with .run file? I’ve looked through the advanced option list and didn’t seem to find anything related. Or is there anyway I can simply compile the code on a guest without GPU access without any errors? Thanks for the help!

If there’s no package from the distro available, you could try running the installer with --no-kernel-module option, maybe the gpu check gets skipped then, IDK.
Another approach might be doing it manually.
Afaik, cuda only needs libcuda from the driver package, so you could run the .run installer with -x option to just uncompress it, then put libcuda.so.440.64 from the created directory in your lib directory and create the symlinks libcuda.so and libcuda.so.1 to it.
From your description, this sounds like you also miss setting the correct include directory.