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
相关推荐
坤坤子吖2 小时前
Linux网络编程:自定义应用层协议与 JSON 序列化
linux·服务器·网络·c++·笔记·json
Felven4 小时前
华为鲲鹏920s芯片serdestool工具使用说明
linux·运维·服务器·华为·鲲鹏920·serdestool
莫晓燚4 小时前
mall 电商项目完整部署---实战
linux·运维·docker·容器
咋的啥名都用不了呢~4 小时前
Linux项目部署5(安装Nginx的插件)
linux
CodeYp20195 小时前
第11讲:应用层协议 HTTP
linux·http
爱和冰阔落5 小时前
【Linux网络】JsonCpp 怎么实现序列化?从 Request/Response 到网络计算器消息设计
linux·运维·网络·php
我是koten11 小时前
【运维杂谈】K8s遇到Terminating的名称空间删除不了怎么办?(解决方案亲测有效)
linux·运维·服务器·云原生·kubernetes·k8s·名称空间
2601_9679873718 小时前
安装 Redis 或 Redis Stack
linux·windows·redis·macos·安装
feng_you_ying_li18 小时前
linux之数据链路层
linux·网络·智能路由器
GeW20 小时前
高端化走到深处,是数据库和Linux的事
linux