赞
踩
参考:使用4090显卡编译代码报错 · Issue #14821 · ApolloAuto/apollo · GitHub
一、下载apollo
https://codeload.github.com/ApolloAuto/apollo/tar.gz/refs/tags/v9.0.0
二、创建并进入apollo容器
1. 修改 docker/scripts/dev_start.sh第33行为:
VERSION_X86_64="dev-x86_64-18.04-20231128_2222"
2. 运行
- cd apollo-9.0.0
-
- bash docker/scripts/dev_start.sh
-
- bash docker/scripts/dev_into.sh
三、编译
1. 修改third_party/centerpoint_infer_op/workspace.bzl为:
- """Loads the paddlelite library"""
-
- # Sanitize a dependency so that it works correctly from code that includes
- # Apollo as a submodule.
- load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
-
- def clean_dep(dep):
- return str(Label(dep))
-
- def repo():
- http_archive(
- name = "centerpoint_infer_op-x86_64",
- sha256 = "038470fc2e741ebc43aefe365fc23400bc162c1b4cbb74d8c8019f84f2498190",
- strip_prefix = "centerpoint_infer_op",
- urls = ["https://apollo-pkg-beta.bj.bcebos.com/archive/centerpoint_infer_op_cu118.tar.gz"],
- )
-
- http_archive(
- name = "centerpoint_infer_op-aarch64",
- sha256 = "e7c933db4237399980c5217fa6a81dff622b00e3a23f0a1deb859743f7977fc1",
- strip_prefix = "centerpoint_infer_op",
- urls = ["https://apollo-pkg-beta.bj.bcebos.com/archive/centerpoint_infer_op-linux-aarch64-1.0.0.tar.gz"],
- )
2. 修改third_party/paddleinference/workspace.bzl为:
- """Loads the paddlelite library"""
-
- # Sanitize a dependency so that it works correctly from code that includes
- # Apollo as a submodule.
- load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
-
- def clean_dep(dep):
- return str(Label(dep))
-
- def repo():
- http_archive(
- name = "paddleinference-x86_64",
- sha256 = "7498df1f9bbaf5580c289a67920eea1a975311764c4b12a62c93b33a081e7520",
- strip_prefix = "paddleinference",
- urls = ["https://apollo-pkg-beta.cdn.bcebos.com/archive/paddleinference-cu118-x86.tar.gz"],
- )
-
- http_archive(
- name = "paddleinference-aarch64",
- sha256 = "048d1d7799ffdd7bd8876e33bc68f28c3af911ff923c10b362340bd83ded04b3",
- strip_prefix = "paddleinference",
- urls = ["https://apollo-pkg-beta.bj.bcebos.com/archive/paddleinference-linux-aarch64-1.0.0.tar.gz"],
- )
3. 注释掉文件modules/perception/common/inference/tensorrt/rt_legacy.h的
- // #ifdef __aarch64__
-
- // #endif
4. 编译
bash /apollo/apollo.sh build_opt_gpu
5. 成了!
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。