ubuntu 22.04 源码安装 apollo 8.0

复制代码
对于其他的关于GPU的安装包需求,这里不再列出,因为我之前安装过,偷个懒就不写了,哈哈哈哈

1, 安装docker

安装docker命令(这里的安装命令都是在docker官网,还有安装包):

1, 设置docker的apt仓库

c++ 复制代码
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg

# Add the repository to Apt sources:
echo \
  "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

2, 如果没有安装过docker,那么直接跳过下面的步骤进行,如果安装过想重新安装,安装下面的步骤进行

c++ 复制代码
sudo apt remove docker-desktop
rm -r $HOME/.docker/desktop
sudo rm /usr/local/bin/com.docker.cli
sudo apt purge docker-desktop

sudo apt-get purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
sudo rm -rf /var/lib/docker
sudo rm -rf /var/lib/containerd

3, 安装docker-desktop

c++ 复制代码
首先下载docker-desktop的deb安装包,下载地址:https://docs.docker.com/desktop/install/ubuntu/

然后执行下面的命令:

sudo apt-get update
sudo apt-get install ./docker-desktop-<version>-<arch>.deb

致辞安装完成,然后在终端执行下面的命令测试docker是否安装成功:

复制代码
docker pull hello-world
docker run hello-world

如果得到如下输出则证明安装成功:
Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

4, 安装过程中我遇到了如下问题:

c++ 复制代码
无法登录docker hub,
解决方法:
删除home/.docker/config.json文件
然后重新登录就好,执行这些操作的前提得是你有docker hub账号,登录命令如下
docker login --username <用户名>
随后输入密码(或者是你创建的tokenk令牌的密码)

2, 下载编译测试apollo 8.0源码

1, 下载apollo 8.0 的源码

复制代码
git clone https://github.com/ApolloAuto/apollo.git

如果国内的clone很慢执行下面的这个命令一定成功
git clone https://ghproxy.com/https://github.com/ApolloAuto/apollo.git

2, 编译

编译前可能会存在NVIDIA Container Toolkit,可以去nvidia官网查看安装步骤,比我写的清楚。编译命令如下

c++ 复制代码
1, 启动并进入 docker 容器(前提是你得登录docker hub,我遇到的就是,当我没有登录docker hub,无法编译成功),在终端输入以下命令:

cd ~/apollo
bash docker/scripts/dev_start.sh


2, 下面这句执行后会进入到docker容器
bash docker/scripts/dev_into.sh


3,启动 dreamview, 在终端输入以下命令,执行后在浏览器输入下面的连接地址(http://localhost:8888):
bash scripts/bootstrap.sh

4, 测试

复制代码
wget https://apollo-system.cdn.bcebos.com/dataset/6.0_edu/demo_3.5.record

cyber_recorder play -f demo_3.5.record --loop

如果提示:bash: cyber_recorder: command not found,使用下面的命令修复,然后再次执行上面的命令
source ./cyber/setup.bash
相关推荐
爱丶狸8 小时前
Grafana_Zabbix_ImageRenderer_部署与前端操作手册
linux·前端·zabbix·grafana·kylin
k4m7v2pz10 小时前
把 Bevy 0.14 游戏移植到 R36S 掌机:一场与“无窗口系统“的搏斗
linux·rust·bevy·r36s·rk3326·开源掌机
木子欢儿11 小时前
Intel 架构的 MacBook Pro 运行 Linux 发热量高解决
linux·运维·服务器
会编程的土豆14 小时前
Go 模板初识
linux·运维·服务器
regret~16 小时前
【记录】网络路由、转发与网卡隔离
linux·服务器·网络
aFakeProgramer16 小时前
Linux版本兼容问题及RTA-VRTE环境配置笔记
linux·笔记
Zhu75816 小时前
在Ubuntu24快速配置专用SFTP
linux·sftp
码农客栈17 小时前
Linux 内核顶层 Makefile 详解
linux
Embedded-Xin17 小时前
Rust学习——Cargo工具
linux·学习·架构·rust·嵌入式
weixin_4357761117 小时前
2026年长沙托育vi设计从风格定位到元素运用的设计方法
linux·运维·服务器·python