원문:
https://carla.readthedocs.io/en/latest/build_docker/
docker image 가져오기, 현재 0.9.14
https://hub.docker.com/r/carlasim/carla/
$ docker pull carlasim/carla:0.9.14
or
$ docker pull carlasim/carla
CARLA를 docker container로 실행하기 위해서는 nvidia-docker2를 설치해야 한다.
Setup the package repository and the GPG key:
$ distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \
&& curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
&& curl -s -L https://nvidia.github.io/libnvidia-container/$distribution/libnvidia-container.list | \
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
Install the nvidia-docker2 package
$ sudo apt-get update
$ sudo apt-get install -y nvidia-docker2
docker 재시작
$ sudo systemctl restart docker
설치 확인
$ sudo docker run --rm --gpus all nvidia/cuda:11.6.2-base-ubuntu20.04 nvidia-smi
To run CARLA with a display:
$ sudo docker run --privileged --gpus all --net=host -e DISPLAY=$DISPLAY carlasim/carla:0.9.13 /bin/bash ./CarlaUE4.sh
To run CARLA in off-screen mode:
$ sudo docker run --privileged --gpus all --net=host -v /tmp/.X11-unix:/tmp/.X11-unix:rw carlasim/carla:0.9.12 /bin/bash ./CarlaUE4.sh -RenderOffScreen