carla
carla copied to clipboard
CARLA simulator container using Docker
CARLA version: 0.9.15 Platform/OS: Windows 11 Home Problem You Have Experienced: When running the CARLA simulator container using Docker, the container exits with the following error:
[+] Running 1/0
✔ Container carla-vss-carla-1 Created 0.0s
Attaching to carla-1
carla-1 | 4.26.2-0+++UE4+Release-4.26 522 0
carla-1 | Disabling core dumps.
carla-1 | sh: 1: xdg-user-dir: not found
carla-1 exited with code 1
What You Expected to Happen: The container should start and run the CARLA simulator without errors.
Steps to Reproduce:
- Compose.yaml
services:
carla:
image: carlasim/carla:0.9.15
command: ["/bin/bash", "./CarlaUE4.sh", "-vulkan"]
runtime: nvidia
ports:
- "2000-2002:2000-2002"
environment:
- DISPLAY=:0
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=all
- SDL_VIDEODRIVER=x11
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- ${HOME}/.Xauthority:/root/.Xauthority:rw
- /usr/share/vulkan/icd.d:/usr/share/vulkan/icd.d:ro
privileged: true
network_mode: "host"
stdin_open: true
tty: true
@pennyfea @joel-mb Is there a solution already here to run Carla Simulator using Docker ?
@joel-mb No, sorry I couldn't figure it out and abandoned this approach.
Hi, there are some parts that doesn't look right.
"/tmp/.X11unit" u"/usr/share/vulkan/icd.d" looks like linux paths and not a windows path.
Do you use a x11 server on your windows machine? If you try to use X11 on widows, you need a software to show a window (or you use "-RenderOffScreen" for no window)
On an ubuntu system, it looks like this
sudo apt-get install -y nvidia-docker2
sudo systemctl restart docker
xhost +
sudo docker run --privileged --gpus all --net=host -e DISPLAY=$DISPLAY -e SDL_VIDEODRIVER=x11 -v /tmp/.X11-unix:/tmp/.X11-unix:rw carlasim/carla:0.9.13 /bin/bash ./CarlaUE4.sh -vulkan
i have the same problem and have found no solution !! i am using wsl on windows
I'm having the exact same issue, it just exits with exit code 1 but without any error
Please write down everything you tried.
Did you open a command line in the docker container and check if nvidia-smi works? Did you use "-RenderOffScreen"? Did you follow the documentation?