How to run opengl app with singularity in novnc/virtualgl client?

1,436 views
Skip to first unread message

Christophe Trophime

unread,
Jan 20, 2018, 9:45:58 AM1/20/18
to singu...@lbl.gov
Hi, I'm trying to run a very basic singularity container 
to test opengl application within a novnc/virtualgl client.
I've got the following error message:

singularity/2.4.2 loaded
ERROR: ld.so: object 'libdlfaker.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object 'libvglfaker.so' from LD_PRELOAD cannot be preloaded: ignored.
name of display: :3
Xlib:  extension "GLX" missing on display ":3".
Xlib:  extension "GLX" missing on display ":3".

Here is the command I tried:
#!/bin/bash

module load singularity

vglrun +v \
   singularity exec --nv \
     -H $HOME:/home/$USER \
     -B /usr/lib64/libdlfaker.so:/usr/lib/libdlfaker.so \
     -B /usr/lib64/libvglfaker.so:/usr/lib/libvglfaker.so \
    test_opengl.simg glxinfo

The base system is scientific linux / carbon
My recipe:
Bootstrap: docker
From: debian:stretch

%runscript
exec echo "The runscript is the containers default runtime command!"

%setup
    echo "Looking in directory '$SINGULARITY_ROOTFS' for /bin/sh"
    if [ ! -x "$SINGULARITY_ROOTFS/bin/sh" ]; then
        echo "Hrmm, this container does not have /bin/sh installed..."
        exit 1
    fi
exit 0

%environment

%post
apt-get update
apt-get -y upgrade
apt-get -y install emacs vim nano \
   lshw lsb-release bash-completion \
   kmod iputils-ping net-tools \
   wget curl

sh /tmp/NVIDIA-DRIVER.run -a -N --ui=none --no-kernel-module
rm /tmp/NVIDIA-DRIVER.run
# apt-get -y install nvidia-driver nvidia-smi

apt-get -y install mesa-utils mesa-utils-extra x11-apps
dpkg -i /tmp/virtualgl_2.5.2_amd64.deb

Any idea how to fix this?
Best
C

David Trudgian

unread,
Jan 22, 2018, 11:07:33 AM1/22/18
to singu...@lbl.gov

Hi Christoph,

 

You should just be able to install vglrun natively in your container, and then ‘singularity exec –nv vglrun myprog’ – don’t bind in from the host, or run vglrun on the host.

 

We are using this to run blender successfully in an Ubuntu 16.04 container on RHEL6 host.

 

--

David Trudgian Ph.D.
Computational Scientist, BioHPC

Lyda Hill Department of Bioinformatics
UT Southwestern Medical Center
Dallas, TX 75390-9365

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@lbl.gov.



UT Southwestern

Medical Center

The future of medicine, today.

Christophe Trophime

unread,
Jan 24, 2018, 6:05:16 AM1/24/18
to singu...@lbl.gov
Thanks, it's indeed working quite well

To unsubscribe from this group and stop receiving emails from it, send an email to singularity+unsubscribe@lbl.gov.



UT Southwestern

Medical Center

The future of medicine, today.

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity+unsubscribe@lbl.gov.

Reply all
Reply to author
Forward
0 new messages