编译Apollo时报错Could not find any cuda.h matching version ‘‘ in any subdirectory

2024-05-04 07:44

本文主要是介绍编译Apollo时报错Could not find any cuda.h matching version ‘‘ in any subdirectory,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

如果对执行Apollo的脚本docker/scripts/dev_start.sh生成的docker容器内的环境里的cuda版本作了修改,例如用比较新一点的cuda11.8代替了容器内默认安装的cuda11.1(卸载掉后安装新版本或者把新版本文件考本进容器后设置cuda相关环境变量),编译Apolllo时会报下面的错误:

(07:43:07) INFO: Repository local_config_cuda instantiated at:/apollo/WORKSPACE:20:20: in <toplevel>/apollo/tools/workspace.bzl:94:19: in apollo_repositories
Repository rule cuda_configure defined at:/apollo/third_party/gpus/cuda_configure.bzl:1276:33: in <toplevel>
(07:43:07) ERROR: An error occurred during the fetch of repository 'local_config_cuda':Traceback (most recent call last):File "/apollo/third_party/gpus/cuda_configure.bzl", line 1247, column 38, in _cuda_autoconf_impl_create_local_cuda_repository(repository_ctx)File "/apollo/third_party/gpus/cuda_configure.bzl", line 844, column 35, in _create_local_cuda_repositorycuda_config = _get_cuda_config(repository_ctx, find_cuda_config_script)File "/apollo/third_party/gpus/cuda_configure.bzl", line 537, column 30, in _get_cuda_configconfig = find_cuda_config(repository_ctx, find_cuda_config_script, ["cuda", "cudnn"])File "/apollo/third_party/gpus/cuda_configure.bzl", line 514, column 41, in find_cuda_configexec_result = _exec_find_cuda_config(repository_ctx, script_path, cuda_libraries)File "/apollo/third_party/gpus/cuda_configure.bzl", line 508, column 19, in _exec_find_cuda_configreturn execute(repository_ctx, [python_bin, "-c", decompress_and_execute_cmd])File "/apollo/tools/platform/common.bzl", line 166, column 13, in executefail(
Error in fail: Repository command failed
Could not find any cuda.h matching version '' in any subdirectory:'''include''include/cuda''include/*-linux-gnu''extras/CUPTI/include''include/cuda/CUPTI''local/cuda/extras/CUPTI/include'
of:'/usr/local/cuda-11.1'

需要修改.apollo.bazelrc里的cuda相关设置: 
#build --action_env CUDA_TOOLKIT_PATH="/usr/local/cuda-11.1"

build --action_env CUDA_TOOLKIT_PATH="/usr/local/cuda-11.8"
build --action_env TF_CUDA_COMPUTE_CAPABILITIES="3.7,5.2,6.0,6.1,7.0,7.2,7.5,8.6,8.7"

然后编译可以过了。 

这篇关于编译Apollo时报错Could not find any cuda.h matching version ‘‘ in any subdirectory的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/958682

相关文章

MySQL中FIND_IN_SET函数与INSTR函数用法解析

《MySQL中FIND_IN_SET函数与INSTR函数用法解析》:本文主要介绍MySQL中FIND_IN_SET函数与INSTR函数用法解析,本文通过实例代码给大家介绍的非常详细,感兴趣的朋友一... 目录一、功能定义与语法1、FIND_IN_SET函数2、INSTR函数二、本质区别对比三、实际场景案例分

idea maven编译报错Java heap space的解决方法

《ideamaven编译报错Javaheapspace的解决方法》这篇文章主要为大家详细介绍了ideamaven编译报错Javaheapspace的相关解决方法,文中的示例代码讲解详细,感兴趣的... 目录1.增加 Maven 编译的堆内存2. 增加 IntelliJ IDEA 的堆内存3. 优化 Mave

Java编译生成多个.class文件的原理和作用

《Java编译生成多个.class文件的原理和作用》作为一名经验丰富的开发者,在Java项目中执行编译后,可能会发现一个.java源文件有时会产生多个.class文件,从技术实现层面详细剖析这一现象... 目录一、内部类机制与.class文件生成成员内部类(常规内部类)局部内部类(方法内部类)匿名内部类二、

Linux find 命令完全指南及核心用法

《Linuxfind命令完全指南及核心用法》find是Linux系统最强大的文件搜索工具,支持嵌套遍历、条件筛选、执行动作,下面给大家介绍Linuxfind命令完全指南,感兴趣的朋友一起看看吧... 目录一、基础搜索模式1. 按文件名搜索(精确/模糊匹配)2. 排除指定目录/文件二、根据文件类型筛选三、时间

IDEA编译报错“java: 常量字符串过长”的原因及解决方法

《IDEA编译报错“java:常量字符串过长”的原因及解决方法》今天在开发过程中,由于尝试将一个文件的Base64字符串设置为常量,结果导致IDEA编译的时候出现了如下报错java:常量字符串过长,... 目录一、问题描述二、问题原因2.1 理论角度2.2 源码角度三、解决方案解决方案①:StringBui

解决Spring运行时报错:Consider defining a bean of type ‘xxx.xxx.xxx.Xxx‘ in your configuration

《解决Spring运行时报错:Considerdefiningabeanoftype‘xxx.xxx.xxx.Xxx‘inyourconfiguration》该文章主要讲述了在使用S... 目录问题分析解决方案总结问题Description:Parameter 0 of constructor in x

解决IDEA使用springBoot创建项目,lombok标注实体类后编译无报错,但是运行时报错问题

《解决IDEA使用springBoot创建项目,lombok标注实体类后编译无报错,但是运行时报错问题》文章详细描述了在使用lombok的@Data注解标注实体类时遇到编译无误但运行时报错的问题,分析... 目录问题分析问题解决方案步骤一步骤二步骤三总结问题使用lombok注解@Data标注实体类,编译时

提示:Decompiled.class file,bytecode version如何解决

《提示:Decompiled.classfile,bytecodeversion如何解决》在处理Decompiled.classfile和bytecodeversion问题时,通过修改Maven配... 目录问题原因总结问题1、提示:Decompiled .class file,China编程 bytecode

maven 编译构建可以执行的jar包

💝💝💝欢迎莅临我的博客,很高兴能够在这里和您见面!希望您在这里可以感受到一份轻松愉快的氛围,不仅可以获得有趣的内容和知识,也可以畅所欲言、分享您的想法和见解。 推荐:「stormsha的主页」👈,「stormsha的知识库」👈持续学习,不断总结,共同进步,为了踏实,做好当下事儿~ 专栏导航 Python系列: Python面试题合集,剑指大厂Git系列: Git操作技巧GO

Maven创建项目中的groupId, artifactId, 和 version的意思

文章目录 groupIdartifactIdversionname groupId 定义:groupId 是 Maven 项目坐标的第一个部分,它通常表示项目的组织或公司的域名反转写法。例如,如果你为公司 example.com 开发软件,groupId 可能是 com.example。作用:groupId 被用来组织和分组相关的 Maven artifacts,这样可以避免