Linux+Caffe+多卡+python编译问题汇总

本文介绍了解决多GPU环境下编译测试时的问题,包括如何通过设置环境变量来指定使用的GPU,以及解决OpenCV共享库找不到的问题,并提供详细的步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1、使用多卡make runtest时,若直接make,会出现如下编译问题,修改方法为:使用export CUDA_VISIBLE_DEVICES=?指定某一张卡。

2、使用export CUDA_VISIBLE_DEVICES=?指定第?卡进行make runtest时(在Docker中编译),Makefile.config文件中应设置GPUID为0,因为Docker中只显示一张显卡。采用默认第0张卡即可。

# The ID of the GPU that 'make runtest' will use to run unit tests.
TEST_GPUID := 0

3、libopencv_core.so.3.2: cannot open shared object file: No such file or directory 

解决方法:https://github.com/GaoHongchen/DIPDemo/issues/1

  1. Find the folder containing the shared library libopencv_core.so.3.2 using the following command line.
sudo find / -name libopencv_core.so.3.2

Then I got the result: /usr/local/lib/libopencv_core.so.3.2.
2. Create a file called /etc/ld.so.conf.d/opencv.conf and write to it the path to the folder where the binary is stored.For example, I wrote /usr/local/lib/ to my opencv.conf file.
3. Run the command line as follows.

ldconfig -v
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值