Problems installing drivers on CentOS server

I have a server with 3 GPU NVIDIA P100 with Centos 7 installed with gnome desktop environment.
Kernel: 3.10.0-862.14.4.el7.x86_64

I tried installing the driver for P100 boards, latest version being 375.20 (downloaded from nvidia.com)

First error encountered was: "Failed to run /usr/sbin/dkms build -m nvidia -v 375.20 -k 3.10.0-862.14.4.el7.x86_64

Second error: Failed to install the kernel module through DKMS

Then I tried to install the driver without DKMS support but I get another error:
An error occurred while performing the step “Building kernel modules” and the installation is aborted.

Now, the gnome desktop isn’t working/logging in, saying it encountered an error and I need to log out, but it tries again to log in and I am in a loop there.
IMPORTANT: my VGA monitor is connected on the mainboard of the server, the GPU are to be used only for computing (bitcoin mining for example).

I am able to access the command line (single user boot option), but don’t know what else to do from this point.

More info on the issue…

GCC version is 4.8.5
Everything else is updated to latest versions

In the log file /var/lib/dkms/nvidia/375.20/build/make.log I see some Error 1 when trying to [make] some files in /var/lib/dkms/nvidia/375.20/build/nvidia

May be an issue of incompatibility between kernel - gcc - dkms - nvidia driver???

Please use a current 410/415 driver from a repository like rpmfusion, not the .run installers.

At rpmfusion we don’t have <=7.5 support due to fedora epel withdrawing libglvnd package, <=7.5 users will need to download libglvnd from koji.

https://koji.fedoraproject.org/koji/buildinfo?buildID=1096712

https://bugzilla.redhat.com/show_bug.cgi?id=1644446