Git clone源碼后直接運行自帶的安裝腳本即可,
# 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
但因為我們Linux系統為RHEL 7.3,而官方沒有給出RHEL的安裝文檔,而我們上面運行的腳本是官方給出的Amazon Linux的安裝步驟來的,所以在安裝過程中會出現如下錯誤。
image
所以,可能的原因就是在redhat中這些包不叫上面的名字。
現在安裝的過程中可以不糾結這些問題,編輯安裝腳本,注釋掉如下兩行即可:
vim install-mxnet-amz-linux.sh
image
之后出現安裝成功即可。
Paste_Image.png
最后,我們來驗證一下MXNet的安裝情況
[root@localhost ~]# cd /root/mxnet/example/image-classification/
[root@localhost image-classification]# python train_mnist.py
如果能正常跑出結果則配置完成。
Paste_Image.png