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
相关推荐
平平无奇。。。几秒前
版本控制器之Git理论与实战
linux·git·gitee·github
宇宙第一小趴菜5 分钟前
11 安装回忆相册
linux·运维·centos7·yum·回忆相册·kh_mod
艾莉丝努力练剑6 分钟前
【Linux指令 (二)】不止于入门:探索Linux系统核心与指令的深层逻辑,理解Linux系统理论核心概念与基础指令
linux·服务器·数据结构·c++·centos
conkl16 分钟前
Linux IP 网络配置与管理详解
linux·网络·tcp/ip
lijunjun28 分钟前
当ubuntu 系统的IP地址修改之后,gitlab服务应该如何修改?
tcp/ip·ubuntu·gitlab
ZhiqianXia1 小时前
Linux 内核中控制调试输出的频率和次数
linux
星源~1 小时前
Linux-Ubuntu系统安装特别指导
linux·qt·ubuntu·嵌入式开发·物联网设备
读书读傻了哟1 小时前
Windows 10 使用 VMware Workstation 搭建 Ubuntu 虚拟机
linux·windows·ubuntu
isyangli_blog1 小时前
Windows & Linux 操作系统分区管理
linux·运维·服务器
泽虞1 小时前
《Qt应用开发》笔记p3
linux·开发语言·数据库·c++·笔记·qt·面试