I would like to install Nvidia driver for CUDA only and use nouveau driver or Intel GPU for display (seems Nvidia driver has some issues with OpenGL). Both Nvidia driver and CUDA toolkit are available from repository. After installing, Nvidia driver is used for display too. Switching to Intel GPU through Nvidia settings makes it impossible for CUDA to use Nvidia GPU. Edited /etc/X11/xorg.conf file results to black screen.
I tried manual installation with the --no-opengl-files flag but got error like "pre-installation script failed".
How to install Nvidia driver for CUDA only from repository?