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
相关推荐
还是奇怪21 分钟前
Linux - 安全排查 2
linux·运维·安全
tan77º2 小时前
【Linux网络编程】Socket - UDP
linux·服务器·网络·c++·udp
czhc11400756632 小时前
Linux 76 rsync
linux·运维·python
蓝易云3 小时前
Qt框架中connect()方法的ConnectionType参数使用说明 点击改变文章字体大小
linux·前端·后端
花落已飘4 小时前
多线程 vs 异步
linux·网络·系统架构
PanZonghui4 小时前
Centos项目部署之Nginx部署项目
linux·nginx
码出钞能力5 小时前
linux内核模块的查看
linux·运维·服务器
星辰云-5 小时前
# Linux Centos系统硬盘分区扩容
linux·运维·centos·磁盘扩容
聽雨2376 小时前
02每日简报20250704
linux·科技·金融·生活·社交电子·娱乐·媒体
Maki Winster6 小时前
Peek-Ubuntu上Gif录制工具-24.04LTS可装
linux·ubuntu·peek