linux下安装warpctc,mxnet和python接口配置

5 篇文章 0 订阅
3 篇文章 0 订阅

nstall baidu warpctc

  

Build the MXNet core shared library

Step 1 Install build tools and Git.

$ sudo apt-get update
$ sudo apt-get install -y build-essential git

Step 2 Install OpenBLAS.

MXNet uses BLAS library for accelerated numerical computations. There are several flavors of BLAS libraries -OpenBLAS,ATLAS and MKL. In this step we install OpenBLAS. You can choose to install ATLAS or MKL.

$ sudo apt-get install -y libopenblas-dev

Step 3 Install OpenCV.

MXNet uses OpenCV for efficient image loading and augmentation operations.

$ sudo apt-get install -y libopencv-dev

Step 4 Download MXNet sources and build MXNet core shared library.

$ git clone --recursive https://github.com/dmlc/mxnet
$ cd mxnet
$ make -j $(nproc) USE_OPENCV=1 USE_BLAS=openblas USE_CUDA=1 USE_CUDA_PATH=/usr/local/cuda USE_CUDNN=1

Note - USE_OPENCV, USE_BLAS, USE_CUDA, USE_CUDA_PATH AND USE_CUDNN are make file flags to set compilation options to use opencv, OpenBLAS, CUDA and cuDNN libraries. You can explore and use more compilation options inmake/config.mk. Make sure to set USE_CUDA_PATH to right CUDA installation path. In most cases it is -/usr/local/cuda.


Build the MXNet Python binding

Step 1 Install prerequisites - python setup tools and numpy.

$ sudo apt-get install -y python-dev python-setuptools python-numpy

Step 2 Build the MXNet Python binding.

$ cd python
$ sudo python setup.py install


cd ~/ git clone https://github.com/baidu-research/warp-ctc cd warp-ctc mkdir build cd build cmake .. make sudo make install

Enable warpctc in mxnet

  comment out following lines in make/config.mk
  WARPCTC_PATH = $(HOME)/warp-ctc
  MXNET_PLUGINS += plugin/warpctc/warpctc.mk
  
  rebuild mxnet by
  make clean && 
make -j $(nproc) USE_OPENCV=1 USE_BLAS=openblas USE_CUDA=1 USE_CUDA_PATH=/usr/local/cuda USE_CUDNN=1
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值