CUDA over server

I have ubuntu 18.04 machine. I am compiling cuda programs on server via VNCserver.
I found that Eclipse Nsight edition is available for linux and MacOS. Can anyone help me in setting up machine, so that i can write code on my machine and execute it on server and display output on my machine!!
If its possible!

Cause i saw one guy doing it in one video[he was using windows and Visual studio and NV GPU on server]