True headless rendering
Posted: 05 Jul 2021, 14:32
Running CoppeliaSim in headless mode is achieved with the -h command line option.
On a headless server, you can also run CoppeliaSim with hardware acceleration, using VirtualGL. VirtualGL is an open source toolkit that gives any Unix or Linux remote display software the ability to run OpenGL applications with full 3D hardware acceleration. First insure that you have the nVidia proprietary driver installed. I.e. you should get an output when running nvidia-smi. Now run the following commands:
You will now need to reboot, and then start the X server:
If nohup sudo X above fails (check the output of the nohup.out file), try to run this first:
Now we are good to go! To render the application with the first GPU, you can do the following:
To render with the second GPU, you will instead set display as: export DISPLAY=:0.1, and so on.
Special thanks to Stephen James for above instructions.
On a headless server, you can also run CoppeliaSim with hardware acceleration, using VirtualGL. VirtualGL is an open source toolkit that gives any Unix or Linux remote display software the ability to run OpenGL applications with full 3D hardware acceleration. First insure that you have the nVidia proprietary driver installed. I.e. you should get an output when running nvidia-smi. Now run the following commands:
Code: Select all
sudo apt-get install xorg libxcb-randr0-dev libxrender-dev libxkbcommon-dev libxkbcommon-x11-0 libavcodec-dev libavformat-dev libswscale-dev
sudo nvidia-xconfig -a --use-display-device=None --virtual=1280x1024
# Install VirtualGL
wget https://sourceforge.net/projects/virtualgl/files/2.5.2/virtualgl_2.5.2_amd64.deb/download -O virtualgl_2.5.2_amd64.deb
sudo dpkg -i virtualgl*.deb
rm virtualgl*.deb
Code: Select all
sudo reboot
nohup sudo X &
Code: Select all
sudo /etc/init.d/gdm3 stop
Code: Select all
export DISPLAY=:0.0
./coppeliaSim.sh
Special thanks to Stephen James for above instructions.