在centos安装mxnet,并配置GPU

### install mxnet of GPU on centos


# Prerequisites:
1. Install CUDA 8.0 following the NVIDIA’s installation guide(http://docs.nvidia.com/cuda/cuda-installation-guide-linux/)
2. Install cuDNN 5 for CUDA 8.0 following the NVIDIA’s installation guide. You may need to register with NVIDIA for downloading the cuDNN library.
https://developer.nvidia.com/cudnn
note:Make sure to add CUDA install path to LD_LIBRARY_PATH.


export LD_LIBRARY_PATH=/usr/local/cuda/lib64/:$LD_LIBRARY_PATH






# Building MXNet from source is a 2 step process.
# 1. Build the MXNet core shared library, libmxnet.so, from the C++ sources.
# 2. Build the language specific bindings. Example - Python bindings, Scala bindings.




#Build the MXNet core shared library

#Step 1. Install build tools and git.
sudo yum update
sudo yum install -y build-essential git


#Step 2. Install OpenBLAS.
sudo yum install -y libopenblas-dev liblapack-dev


#Step 3. Install OpenCV.
sudo yum install -y libopencv-dev


#Step 4. Download MXNet sources and build MXNet core shared library.
sudo git clone --recursive https://github.com/apache/incubator-mxnet.git mxnet --branch 0.11.0
cd mxnet
sudo make -j $(nproc) USE_OPENCV=1 USE_BLAS=openblas USE_CUDA=1 USE_CUDA_PATH=/usr/local/cuda-8.0 USE_CUDNN=1






#Install the MXNet Python binding

#Step 1. Install prerequisites - python, setup-tools, python-pip and numpy.
sudo yum install -y python-dev python-setuptools python-numpy python-pip


#Step 2. Install the MXNet Python binding.
cd python
sudo pip install --upgrade pip
sudo pip install -e .


#Step 3. Install Graphviz.
sudo yum install graphviz




#Validate MXNet Installation
python
import mxnet as mx




### 实例setup

sudo python setup.py install


python train_mnist.py --gpus 0


citing:
https://mxnet.incubator.apache.org/get_started/install.html
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值