对于其他的关于GPU的安装包需求,这里不再列出,因为我之前安装过,偷个懒就不写了,哈哈哈哈
1, 安装docker
安装docker命令(这里的安装命令都是在docker官网,还有安装包):
1, 设置docker的apt仓库
# 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,那么直接跳过下面的步骤进行,如果安装过想重新安装,安装下面的步骤进行
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
首先下载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, 安装过程中我遇到了如下问题:
无法登录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官网查看安装步骤,比我写的清楚。编译命令如下
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