carla-simulator / carla

Open-source simulator for autonomous driving research.
http://carla.org
MIT License
11.18k stars 3.61k forks source link

Failed to start carla docker #7296

Open EunhoCho opened 6 months ago

EunhoCho commented 6 months ago

CARLA version: 0.9.15 Platform/OS: Ubuntu 22.04 Problem you have experienced: Tried to run carla docker on SSH with GUI What you expected to happen: Run Carla properly. Steps to reproduce:

I set up my GUI environment locally (Windows 11) and connected to the server where I want to run Carla. Run Carla docker using the command below. docker run -it --name carla --privileged --rm --net=host -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:rw -v "$HOME/.Xauthority:/home/carla/.Xauthority:rw" carlasim/carla:0.9.15 ./CarlaUE4.sh -quality-level=Epic

Then, it prints

4.26.2-0+++UE4+Release-4.26 522 0
Disabling core dumps.
sh: 1: xdg-user-dir: not found

And it stops.

I tried many variances for docker commands, like adding -e SDL_VIDEODRIVER=x11, but nothing has worked.

EunhoCho commented 6 months ago

Well, it works if I give up GUI. docker run -it --name carla --privileged --rm --gpus all --net=host -v /tmp/.X11-unix:/tmp/.X11-unix:rw carlasim/carla:0.9.15 ./CarlaUE4.sh -quality-level=Epic -RenderOffScreen works properly.

However, I wanted to see the GUI...

gawinwong commented 3 months ago

You can use manual_control.py in examples folder to see pygame window of carla camera image

RParkerE commented 3 months ago

@EunhoCho, it does not work giving up the GUI image

Following the steps to get NVIDIA support on Windows Docker, and following your command as shown above in the snapshot, shows even when rendering off screen CARLA currently still throws the error

Abdallah-Hesham99 commented 3 months ago

I had similar problems and it kept crashing even though i installed cuda container, but it was solved using this command docker run --privileged --gpus all --net=host -e DISPLAY=$DISPLAY -e QT_X11_NO_MITSHM=1 -v /tmp/.X11-unix:/tmp/.X11-unix --device /dev/snd carlasim/carla:latest /bin/bash ./CarlaUE4.sh