Using CUDA in a GPU cluster

Dear all,
I am using a cluster with 4 blades. One is the master node without and graphics card. Other three have CUDA compatible high end graphics card. In the master node CUDA was installed without any graphics driver and in the three slave nodes CUDA was installed with appropriate graphics driver. All the four nodes has similar architecture and CUDA installation paths are same on each blades.
I was going to use a software which needs to be compiled with cmake in the master node and I got stuck how to source the paths of CUDA and Nvidia driver environments from different nodes while compiling with cmake. The software needs the proper graphics driver during compilation with cmake. However on the master node there are no graphics driver. Please help and ask for further information if needed.