https://github.com/ApolloAuto/apollo/
https://zhuanlan.zhihu.com/p/369418136
- 克隆仓库 https://github.com/ApolloAuto/apollo.git
- 安装NVIDIA驱动
sudo apt-get install nvidia-driver-495
重启,运行nvidia-smi检查驱动
3. 安装docker
sudo apt install curl
curl [https://get.docker.com](https://link.zhihu.com/?target=https%3A//get.docker.com) | sh
sudo systemctl start docker && sudo systemctl enable docker
增加权限
sudo groupadd docker
sudo usermod -aG docker $USER
logout后重新登录
newgrp docker
docker run hello-world
若安装成功会有显示,然后继续为docker添加启动项
sudo systemctl enable docker.service
sudo systemctl enable containerd.service
可选:安装docker管理软件portainer
docker volume create portainer_data
docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
然后登录https://localhost:9443
- 安装N卡 Container Toolkit,这是apollo运行所必须的组件
distribution=ubuntu18.04
curl -s -L [https://nvidia.github.io/nvidia-docker/gpgkey](https://link.zhihu.com/?target=https%3A//nvidia.github.io/nvidia-docker/gpgkey) | sudo apt-key add -
curl -s -L [https://nvidia.github.io/nvidia-docker/](https://link.zhihu.com/?target=https%3A//nvidia.github.io/nvidia-docker/)$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get -y update
sudo apt-get install -y nvidia-docker2
sudo systemctl restart docker
- 添加docker镜像,加速下载,以免下载失败
sudo nano /etc/docker/daemon.json
https://yeasy.gitbook.io/docker_practice/install/mirror
"registry-mirrors": [
"https://hub-mirror.c.163.com",
"https://mirror.baidubce.com"
],
(注意空格,末尾“,”)
sudo systemctl daemon-reload
sudo systemctl restart docker
- 进入Apollo目录,开始配置(若之前打开过,要先关闭终端,让docker更改生效)
cd apollo
echo “export APOLLO_ROOT_DIR=$(pwd)” >> ~/.bashrc && source ~/.bashrc
newgrp docker
下载docker运行Apollo的环境
bash docker/scripts/dev_start.sh
bash docker/scripts/dev_into.sh
由于cuda升级,需要Remove Bazel output of previous builds
rm -rf /apollo/.cache/{bazel,build,repos}
Re-configure bazelrc.
./apollo.sh config --noninteractive
./apollo.sh build
- 运行
bash scripts/bootstrap.sh
以上完成编译,接下来运行Apollo
- 运行
Startup modules monitor and dreamview, the default option is start.
./scripts/bootstrap.sh [start | stop | restart]
此时再打开网页[http://localhost:8888](http://localhost:8888) 即可看到UI界面
- 下载record用于播放(py文件需要重新定位)
python3 record_helper.py demo_3.5.record
- 播放record
cyber_recorder play -f docs/demo_guide/demo_3.5.record -l