参考carla文档
ubuntu18.04
carla0.9.9
docker19.03.12
Docker Installation
Docker CE
For our tests we used the Docker CE version. To install Docker CE we recommend using this tutorial
NVIDIA-Docker2
To install nvidia-docker-2 we recommend using the “Quick Start” section from the nvidia-dockers github.
转到nvidia-dockers github后可以发现已经不推荐安装NVIDIA-Docker2了,变为NVIDIA Container Toolkit了。
对于ubuntu18.04:
Add the package repositories
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit
sudo systemctl restart docker
这里失败很多次,因为网络问题。建议多尝试几次,更换一下网络。
安装成功:
Running CARLA container
Pull the CARLA image.
docker pull carlasim/carla:0.9.9
Running CARLA under docker.
docker run -p 2000-2002:2000-2002 --runtime=nvidia --gpus all carlasim/carla:0.9.9
The -p 2000-2002:2000-2002 argument is to redirect host ports for the docker container. Use --gpus ‘“device=<gpu_01>,<gpu_02>”’ to specify which GPUs should run CARLA. Take a look at this NVIDIA documentation to learn other syntax options.
You can also pass parameters to the CARLA executable. With this you can chose the town and select the port that is going to be used.
docker run -p 2000-2002:2000-2002 --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=0 carlasim/carla:0.8.4 /bin/bash CarlaUE4.sh < Your list of parameters >
At the list of parameters do not forget to add -world-port=<port_number> so that CARLA runs on server mode listening to the <port_number>.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)