0

I want to do headless rendering on a server where I do not have root permissions. Therefore, I created a Singularity container like this:

Bootstrap: docker
From: nvidia/cuda:9.0-runtime-ubuntu16.04

%post
    apt-get update &&  apt-get -y install \
    python3-pip \
    python3-tk \
    libgtk2.0-dev \
    libgl1-mesa-glx \
    xvfb \
    mesa-utils \
    xserver-xorg \
    nvidia-settings \

    touch /usr/bin/nvidia-smi
    touch /usr/bin/nvidia-xconfig  # not working

After I executed my container:

singularity exec --nv rendering.img bash

I want to check whether everything works:

export DISPLAY=:99.0
Xvfb :99 -screen 0 640x480x24 &

Xvfb :99 -screen 0 640x480x24 &
[1] 20059
XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.

glxinfo | grep "OpenGL version"
Error: couldn't find RGB GLX visual or fbconfig

When I do: nvidia-smi everything works (drivers should be fine). What am I missing here?

Luca Gibelli
  • 2,611
  • 1
  • 21
  • 29
thigi
  • 101
  • 4

1 Answers1

0

nvidia-smi no run openGL when are executed,

directory /tmp/.X11-unix has the unix socket for X server comunication.

for some reason you not have permission for write in /tmp/.X11-unix, because Xvfb need create a socket in this directory.

al3x609
  • 1
  • 1