1 Star 0 Fork 0

王拓/navigator

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
docker.sh 1.26 KB
一键复制 编辑 原始数据 按行查看 历史
Will Heitman 提交于 2023-03-29 16:35 . Release 1.4.0 (#348)
#!/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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wangtuo0820/navigator.git
git@gitee.com:wangtuo0820/navigator.git
wangtuo0820
navigator
navigator
main

搜索帮助

D67c1975 1850385 1daf7b77 1850385