基于ARM64麒麟V10系统安装tensorflow
本篇基于ARM64架构编译安装tensorflow深度学习框架,不支持GPU
安装环境
名称 | 版本 |
---|---|
Linux | kylinV10 |
python | 3.7.4 |
tensorflow | 1.15 |
离线包准备
需要提前配置好Yum源和准备好相关离线安转包
直接安装
直接执行脚本即可
#!/bin/bash
yum -y install python3-pip
tar -xf hdf5.tar.gz -C /usr/include/
export CPATH="/usr/include/hdf5/include/:/usr/include/hdf5/lib/"
ln -s /usr/include/hdf5/lib/libhdf5.so /usr/lib/libhdf5.so
ln -s /usr/include/hdf5/lib/libhdf5_hl.so /usr/lib/libhdf5_hl.so
yum -y install python3-Cython.aarch64
yum -y install python3-h5py.aarch64
yum -y install python3-grpcio.aarch64
yum -y install python3-numpy.aarch64
tar -xf tensor-dependence.tar.gz
cd /home/tensorflow-1.15-v10/tensor-dependence/google_pasta &&
pip3.7 install six-1.15.0-py2.py3-none-any.whl &&
pip3.7 install google_pasta-0.2.0-py3-none-any.whl && cd ..
cd ./Keras_Preprocessing- &&
pip3.7 install Keras_Preprocessing-1.1.2-py2.py3-none-any.whl && cd ..
cd ./termcolor && tar -xf termcolor-1.1.0.tar.gz && cd termcolor-1.1.0 && python3.7 setup.py install && cd ../../ &&
cd absl-py/ &&
pip3.7 install absl_py-0.12.0-py3-none-any.whl &&
cd .. &&
cd protobuf/ &&
pip3.7 install protobuf-3.15.6-py2.py3-none-any.whl &&
cd .. &&
cd wheel/ &&
pip3.7 install wheel-0.36.2-py2.py3-none-any.whl &&
cd .. &&
cd tensorflow-estimator/ &&
pip3.7 install tensorflow_estimator-1.15.1-py2.py3-none-any.whl &&
cd .. &&
cd gast/ && tar -xf gast-0.2.2.tar.gz && cd gast-0.2.2/ &&
python3.7 setup.py install && cd ../../ &&
cd keras-applications &&
pip3.7 install Keras_Applications-1.0.8-py3-none-any.whl &&
cd .. &&
cd wrapt/ && tar -xf wrapt-1.12.1.tar.gz && cd wrapt-1.12.1 &&
python3.7 setup.py install &&
cd ../../ &&
cd setuptools &&
pip3.7 install setuptools-54.1.1-py3-none-any.whl &&
cd ../ &&
cd tensorboad &&
yum -y install python3-grpcio.aarch64 &&
pip3.7 install Werkzeug-1.0.1-py2.py3-none-any.whl &&
pip3.7 install zipp-3.4.1-py3-none-any.whl &&
pip3.7 install typing_extensions-3.7.4.3-py3-none-any.whl &&
pip3.7 install importlib_metadata-3.7.3-py3-none-any.whl &&
pip3.7 install Markdown-3.3.4-py3-none-any.whl &&
pip3.7 install tensorboard-1.15.0-py3-none-any.whl &&
cd ../astor &&
pip3.7 install astor-0.8.1-py2.py3-none-any.whl &&
cd ../opt_einsum &&
pip3.7 install opt_einsum-3.3.0-py3-none-any.whl &&
cd ../.. &&
pip3.7 install tensorflow-1.15.0-cp37-cp37m-linux_aarch64.whl
资源下载链接
https://download.csdn.net/download/YYC1503/18904018