您的位置:首页 > 运维架构 > Linux

【亲测】centos 7下编译并安装warp-ctc

2017-11-21 15:30 381 查看
【亲测】centos 7下编译并安装warp-ctc

【原文链接】

https://mp.weixin.qq.com/s/bJlW5wihiuPbqmr34_Y_5w

【参考】

https://github.com/ChWick/warp-ctc/tree/develop

【步骤】

下载warp-ctc

来源:github ChWick的fork版develop分支

https://github.com/ChWick/warp-ctc/tree/develop

$ git clone -b develop https://github.com/ChWick/warp-ctc.git

切换目录,创建文件夹

$ cd warp-ctc

$ mkdir build

$ cd build

如果使用非标准版的CUDA,请安装 export CUDA_BIN_PATH=/path_to_cuda, 以便被CMake检测

执行cmake

$ cmake ../





编译

$ make



安装

$ sudo make install

最好保存安装的路径信息,以便于后续卸载

如:

$ sudo make install 2>&1 | tee make_install.log



要保证warp-ctc的include和lib路径均在系统搜索路径内,

需要复制头文件和so文件到对应include和lib目录下

$ sudo cp -r /usr/local/warp_ctc /usr/include/

防止出现以下错误:

src/caffe/layers/warp_ctc_loss_layer.cpp:4:28: fatal error: warp_ctc/ctcpp.h: No such file or directory

#include <warp_ctc/ctcpp.h>

^
compilation terminated.


软连接libwarpctc.so文件到/usr/lib64目录下

$ sudo ln -s /usr/local/lib/libwarpctc.so /usr/lib64/libwarpctc.so

查看软连接是否正确建立,下图表明已正确建立软连接



【其他】

查看某个已安装软件的名称信息

$ rpm -qa | grep xx



查看使用yum安装软件的位置信息

$ rpm -ql xx



.

.

.

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: