1#!/bin/bash 2 3# install MindSpore-CPU using pip 4if [ "$(uname)" == Darwin ]; then 5 if [ "$PY_VER" == "3.7" ]; then 6 echo "nothing happens yet" 7 else 8 echo "nothing happens yet" 9 fi 10fi 11 12 13if [ "$(uname)" == Linux ]; then 14 if [ "$(arch)" == aarch64 ]; then 15 echo "running on aarch64 linux system." 16 if [ "$PY_VER" == "3.7" ]; then 17 echo "building conda package for python3.7" 18 pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.5.0-rc1/MindSpore/cpu/aarch64/mindspore-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 19 elif [ "$PY_VER" == "3.9" ]; then 20 echo "building conda package for python3.9" 21 pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.5.0-rc1/MindSpore/cpu/aarch64/mindspore-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 22 else 23 echo "ERROR: you are trying to build MindSpore conda package on a unsupported python environment, try python 3.7 or 3.9" 24 exit 1 25 fi 26 elif [ "$(arch)" == x86_64 ]; then 27 echo "running on x86_64 linux system." 28 if [ "$PY_VER" == "3.7" ]; then 29 echo "building conda package for python3.7" 30 pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.5.0-rc1/MindSpore/cpu/x86_64/mindspore-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 31 elif [ "$PY_VER" == "3.9" ]; then 32 echo "building conda package for python3.9" 33 pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.5.0-rc1/MindSpore/cpu/x86_64/mindspore-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 34 else 35 echo "ERROR: you are trying to build MindSpore conda package on a unsupported python environment, try python 3.7 or 3.9" 36 exit 1 37 fi 38 else 39 echo "ERROR: unknown linux architecture, try building MindSpore conda package on a supported architecture." 40 exit 1 41 fi 42fi 43