安裝環境:redhat7.1+vmw
安裝步驟:
# Install git if not already installed. sudo yum -y install git-all
# Clone mxnet repository. In terminal, run the commands WITHOUT "sudo"
git clone https://github.com/dmlc/mxnet.git ~/mxnet --recursive
# Install MXNet for Python with all required dependencies cd ~/mxnet/setup-utils bash install-mxnet-amz-linux.sh # We have added MXNet Python package path in your ~/.bashrc. # Run the following command to refresh environment variables. $ source ~/.bashrc
步驟雖然簡單,但是安裝過程中可能會遇到以下問題,
1.
找不到這些包,可能的原因,是因為官方沒有給出rehat的安裝文檔,這個是按照官方給出的Amazon Linux上面的安裝步驟來的,所以,可能的原因就是在redhat中這些包不叫上面的名字。
現在安裝的過程中可以不糾結這些問題,編輯install-mxnet-amz-linux.sh,注釋掉如下兩行即可:
2.
如果是停在這里不動了,或者報這樣的錯:
到這里下載ippicv,點擊 下載,然后放到/root/mxnet/setup-utils/opencv/3rdparty/ippicv/downloads/linux-808b791a6eac9ed78d32a7666804320e/ 目錄下,
若改目錄原來就有這個ippicv的文件,刪除它。然后重新編譯。
3.
遇到這個問題的時候查找了下lapacke_mangling.h文件,發現在
然后就把該文件從/root/mxnet/setup-utils/OpenBLAS/lapack-netlib/LAPACKE/include/lapacke_mangling.h拷貝到/usr/local/include/
重新編輯。
4.
安裝openblase-devel,和gcc-c++
yum install openblase-deve gcc-c++ python-devel
3,測試
[root@localhost ~]# cd /root/mxnet/example/image-classification/
[root@localhost image-classification]# python train_mnist.py
如果能正常跑出結果則配置完成。