Running CARLA in a container

Tuanfly·2022년 12월 26일
0

CARLA

목록 보기
2/2

원문:
https://carla.readthedocs.io/en/latest/build_docker/

1. Pull the CARLA image.

docker image 가져오기, 현재 0.9.14

https://hub.docker.com/r/carlasim/carla/

$ docker pull carlasim/carla:0.9.14
or
$ docker pull carlasim/carla

2. Install nvidia-docker2

CARLA를 docker container로 실행하기 위해서는 nvidia-docker2를 설치해야 한다.

https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#installation-guide

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

3. Run the CARLA container.

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
profile
기억력 감퇴...

0개의 댓글