代码拉取完成,页面将自动刷新
#!/bin/sh
# To build: 'docker build -t navigator .'
# The below command is to run a docker container. The container must already be built.
# It passes the ROS_DOMAIN_ID from host. To generate this "randomly" based on your username,
# see https://gist.github.com/wheitman/ceaec50cd4cb79a496f43e6c0e20a8b2
if echo $* | grep -e "-h" -q
then
echo "Usage: ./docker.sh"
echo "Add --no-gpu to skip GPUs"
exit
fi
# Give the Docker container access to the x server,
# which allows it to show graphical applications
xhost +
# Without GPUs
if echo $* | grep -e "--no-gpu" -q
then
echo "GPUS DISABLED"
docker run \
-it \
--rm \
-v $PWD:/navigator \
-v /home/share/carla:/workspace \
-v /dev:/dev \
--net=host \
--privileged \
-v $HOME/.Xauthority:/root/.Xauthority \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e="DISPLAY" \
-e ROS_DOMAIN_ID \
navigator
else # With GPUs
docker run \
-it \
--rm \
-v $PWD:/navigator \
-v /home/share/carla:/workspace \
-v /dev:/dev \
--gpus all \
--net=host \
--privileged \
-v $HOME/.Xauthority:/root/.Xauthority \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e="DISPLAY" \
-e ROS_DOMAIN_ID \
navigator
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。