1#!/bin/bash 2 3# install MindSpore-Ascend using pip 4if [ "$(uname)" == Linux ]; then 5 if [ "$(arch)" == aarch64 ]; then 6 echo "running on aarch64 linux system." 7 if [ "$PY_VER" == "3.7" ]; then 8 echo "building conda package for python3.7" 9 pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.5.0-rc1/MindSpore/ascend/aarch64/mindspore_ascend-1.5.0rc1-cp37-cp37m-linux_aarch64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple 10 elif [ "$PY_VER" == "3.9" ]; then 11 echo "building conda package for python3.9" 12 pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.5.0-rc1/MindSpore/ascend/aarch64/mindspore_ascend-1.5.0rc1-cp39-cp39-linux_aarch64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple 13 else 14 echo "ERROR: you are trying to build MindSpore conda package on a unsupported python environment, try python 3.7 or 3.9" 15 exit 1 16 fi 17 elif [ "$(arch)" == x86_64 ]; then 18 echo "running on x86_64 linux system." 19 if [ "$PY_VER" == "3.7" ]; then 20 echo "building conda package for python3.7" 21 pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.5.0-rc1/MindSpore/ascend/x86_64/mindspore_ascend-1.5.0rc1-cp37-cp37m-linux_x86_64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple 22 elif [ "$PY_VER" == "3.9" ]; then 23 echo "building conda package for python3.9" 24 pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.5.0-rc1/MindSpore/ascend/x86_64/mindspore_ascend-1.5.0rc1-cp39-cp39-linux_x86_64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple 25 else 26 echo "ERROR: you are trying to build MindSpore conda package on a unsupported python environment, try python 3.7 or 3.9" 27 exit 1 28 fi 29 else 30 echo "ERROR: unknown linux architecture, try building MindSpore conda package on a supported architecture." 31 exit 1 32 fi 33fi 34