ucla-mobility / OpenCDA

A generalized framework for prototyping full-stack cooperative driving automation applications under CARLA+SUMO.
Other
1k stars 198 forks source link

Running opencda in docker support #139

Open jewes opened 2 years ago

jewes commented 2 years ago

This is not a real issue, but just some notes for those who want to running opencda in docker environment.

  1. Base Docker Image: I already have a base docker image(ubuntu 18.04) with carla client lib(0.9.11) installed. ie. import carla will not generate any error messages.
  2. OpenCDA installation: Get a copy of the source code, and mount it to the docker container based on image in the previous step using the docker -v options. So you'll get access to the opencda source in the docker container.
  3. X11 support: using docker run option -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY

Possible errors:

  1. In the container shell, try to run a scenario, for example. the single_2lanefree_carla, you may get some libs (limSM.so, libGL.so) missing messages. To fix those errors: using sudo apt-get update && sudo apt-get install -y libsm6 libgl1-mesa-glx to install the dependencies.
  2. You may get some errors like "X error: BadShmSeg, blabla", set environment variable using export QT_X11_NO_MITSHM=1 in the container will fix it.

If you see some other errors, leave a message here, I'll see if I can help.

DerrickXuNu commented 2 years ago

Thanks a lot for addressing this!

wdf19961118 commented 2 years ago

Could you release your base docker image? Thanks@jewes

DerrickXuNu commented 2 years ago

@jewes Hi Jewes, welcome to contribute a PR for the docker image~