I created a GPU instance on Google Compute engine with NVIDIA Tesla K80 attached. I have installed GPU drivers and CUDA based on this guide.
nvidia-smi check - ok.
nvcc -V check - ok
Now I am trying to make sure I can run headless rendering with OpenGL.
I tried this:
sudo nvidia-xconfig -a --use-display-device=none
to configure xconfig.
Then:
export DISPLAY=:0
Finally,running glxgears:
glxinfo | grep OpenGL
I am getting this error:
No protocol specified Error: unable to open display :0
My xorg.conf file looks like this:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 390.30 (buildmeister@swio-display-x64-rhel04-14) Wed Jan 31 22:46:17 PST 2018
Section "ServerFlags"
Option "IgnoreABI" "True"
Option "nolisten" "True"
Option "AutoAddDevices" "False"
EndSection
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "nvidia" 0 0
EndSection
Section "Files"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "Tesla K80"
BusID "PCI:0:4:0"
EndSection
Section "Screen"
Identifier "nvidia"
Device "nvidia"
Option "UseDisplayDevice" "none"
EndSection
What is missing in my config?
My OS: Ubuntu 16.04