Setup Azure Virtual Machine for Carla Autonomous Driving Simulator

The challenge of running carla in the cloud is to render the image completely in the cloud and only then transfer it to the client pc. A normal remote desktop connection is not sufficient. The following steps have led to success:

1. Setup VM on Azure(Standard NC6 6 vcpus 56 GB RAM TESLA K80)
2. Check Hardware: sudo lshw -C display
3. sudo apt-get update
4. sudo add-apt-repository ppa:graphics-drivers/ppa
5. sudo apt update
6. sudo apt install nvidia-418
7. restart VM: sudo reboot und neustart im Azure portal
8. Verifie Installation: nvidia-smi //ist auch comand für Auslastung und Test nvidia-smi -l 1 (jede sec update)
9. Install OpenGL: sudo apt-get install freeglut3-dev mesa-utils
10. Headless nVidia Mini How-To: nvidia-xconfig --query-gpu-info to obtain the bus ID
11. Create an appropriate xorg.conf file for headless operation: sudo nvidia-xconfig -a --allow-empty-initial-configuration --use-display-device=None --virtual=1920x1200 --busid {busid} //BUSID einsetzen!! ohne --use-display if GPU Headless(https://virtualgl.org/Documentation/HeadlessNV)

12. Install VirtualGL: download stable version: wget "https://sourceforge.net/projects/virtualgl/files/2.5.2/virtualgl_2.5.2_amd64.deb"
13. Install VirtualGl: sudo dpkg -i virtualgl*.deb
14. Shut down display manager: sudo /etc/init.d/lightdm stop
15. Run server config: sudo /opt/VirtualGL/bin/vglserver_config
16. Server config: 1; no;no;no;X Enter
17. Restart display manager: sudo /etc/init.d/lightdm start
18. download turbovnc: wget "https://sourceforge.net/projects/turbovnc/files/2.1.1/turbovnc_2.1.1_amd64.deb"
19. Instll turbovnc : dpkg -i turbovnc*.deb
20. sudo apt install x11-xserver-utils libxrandr-dev
21. restart VM multiple times
22. test sudo nohup Xorg :5 //startet xorg auf 5
23. /opt/TurboVNC/bin/vncserver :8 //start virtuelles display auf 8
24. command sollte durchlaufen: DISPLAY=:8 vglrun -d :5.0 glxinfo

CarlaDoku: https://carla.readthedocs.io/en/latest/carla_headless/#emulating-the-virtual-display

1. wget "http://carla-assets-internal.s3.amazonaws.com/Releases/Linux/CARLA_0.9.5.tar.gz"
2. wget "http://carla-assets-internal.s3.amazonaws.com/Releases/Linux/Town07_0.9.5.tar.gz
3. wget "http://carla-assets-internal.s3.amazonaws.com/Releases/Linux/Town06_0.9.5.tar.gz
4. extract tar.gz to new folder carla: tar -xvzf *CARLA*.tar.gz -C ~/carla/
5. sudo apt install python-pip
6. pip install --user pygame numpy
7. start: DISPLAY=:8 vglrun -d :5.0 ~/carla/CarlaUE4/Binaries/Linux/CarlaUE4
8. on client machine start TurboVNCViewer : /opt/TurboVNC/bin/vncviewer
9. python funktioniert nicht fehlt lib daher :sudo apt-get install libpng16-16
At Restart the hardware can change, therefore the PCI slots of the graphics card has to be adapded in /etc/X11/xorg.conf with sudo vim /etc/X11/xorg.conf

Leave a Reply

Your email address will not be published. Required fields are marked *