diff --git a/scripts/install/euleros-ascend-source.sh b/scripts/install/euleros-ascend-source.sh index 0f66e57169f..f51f2aeeabd 100644 --- a/scripts/install/euleros-ascend-source.sh +++ b/scripts/install/euleros-ascend-source.sh @@ -104,7 +104,8 @@ curl -O "https://cmake.org/files/v3.19/${cmake_file_name}" sudo mkdir $HOME/cmake-3.19.8 sudo bash cmake-3.19.8-Linux-*.sh --prefix=$HOME/cmake-3.19.8 --exclude-subdir add_env PATH $HOME/cmake-3.19.8/bin -source ~/.bashrc +set +e && source ~/.bashrc +set -e cd - # optional openmpi for distributed training diff --git a/scripts/install/euleros-ascend310-pip.sh b/scripts/install/euleros-ascend310-pip.sh index 4761f9acba5..44f931a7173 100644 --- a/scripts/install/euleros-ascend310-pip.sh +++ b/scripts/install/euleros-ascend310-pip.sh @@ -108,7 +108,8 @@ curl -O "https://cmake.org/files/v3.19/${cmake_file_name}" sudo mkdir $HOME/cmake-3.19.8 sudo bash cmake-3.19.8-Linux-*.sh --prefix=$HOME/cmake-3.19.8 --exclude-subdir add_env PATH $HOME/cmake-3.19.8/bin -source ~/.bashrc +set +e && source ~/.bashrc +set -e cd - ARCH=`uname -m` diff --git a/scripts/install/ubuntu-cpu-pip.sh b/scripts/install/ubuntu-cpu-pip.sh index e12a627c095..a0e0838d6d3 100644 --- a/scripts/install/ubuntu-cpu-pip.sh +++ b/scripts/install/ubuntu-cpu-pip.sh @@ -64,12 +64,11 @@ sudo update-alternatives --install /usr/bin/python python /usr/bin/python$PYTHON # pip python -m pip install -U pip -i https://pypi.tuna.tsinghua.edu.cn/simple echo -e "alias pip='python -m pip'" >> ~/.bashrc -source ~/.bashrc -pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple +python -m pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple # install mindspore whl arch=`uname -m` -pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/${MINDSPORE_VERSION}/MindSpore/cpu/${arch}/mindspore-${version_map["$PYTHON_VERSION"]}-linux_${arch}.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple +python -m pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/${MINDSPORE_VERSION}/MindSpore/cpu/${arch}/mindspore-${version_map["$PYTHON_VERSION"]}-linux_${arch}.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple # check mindspore installation python -c "import mindspore;mindspore.run_check()" diff --git a/scripts/install/ubuntu-cpu-source.sh b/scripts/install/ubuntu-cpu-source.sh index fdf8ea6092b..2ec5578b164 100644 --- a/scripts/install/ubuntu-cpu-source.sh +++ b/scripts/install/ubuntu-cpu-source.sh @@ -70,12 +70,11 @@ sudo update-alternatives --install /usr/bin/python python /usr/bin/python$PYTHON # pip python -m pip install -U pip -i https://pypi.tuna.tsinghua.edu.cn/simple echo -e "alias pip='python -m pip'" >> ~/.bashrc -source ~/.bashrc -pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple +python -m pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple # wheel -pip install wheel +python -m pip install wheel # python 3.9 needs setuptools>44.0 -pip install -U setuptools +python -m pip install -U setuptools echo "The environment is ready to clone and compile mindspore." diff --git a/scripts/install/ubuntu-gpu-pip.sh b/scripts/install/ubuntu-gpu-pip.sh index 2f4bc7c4865..7736b8c736e 100644 --- a/scripts/install/ubuntu-gpu-pip.sh +++ b/scripts/install/ubuntu-gpu-pip.sh @@ -94,8 +94,7 @@ sudo update-alternatives --install /usr/bin/python python /usr/bin/python$PYTHON # pip python -m pip install -U pip -i https://pypi.tuna.tsinghua.edu.cn/simple echo -e "alias pip='python -m pip'" >> ~/.bashrc -source ~/.bashrc -pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple +python -m pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple # install cuda/cudnn cd /tmp @@ -138,7 +137,7 @@ if [[ X"$OPENMPI" == "Xon" ]]; then fi arch=`uname -m` -pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/${MINDSPORE_VERSION}/MindSpore/gpu/${arch}/${cuda_name}/mindspore_gpu-${version_map["$PYTHON_VERSION"]}-linux_${arch}.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple +python -m pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/${MINDSPORE_VERSION}/MindSpore/gpu/${arch}/${cuda_name}/mindspore_gpu-${version_map["$PYTHON_VERSION"]}-linux_${arch}.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple # check mindspore installation python -c "import mindspore;mindspore.run_check()" diff --git a/scripts/install/ubuntu-gpu-source.sh b/scripts/install/ubuntu-gpu-source.sh index e5f9adbf107..6224a14f932 100644 --- a/scripts/install/ubuntu-gpu-source.sh +++ b/scripts/install/ubuntu-gpu-source.sh @@ -113,8 +113,7 @@ sudo update-alternatives --install /usr/bin/python python /usr/bin/python$PYTHON # pip python -m pip install -U pip -i https://pypi.tuna.tsinghua.edu.cn/simple echo -e "alias pip='python -m pip'" >> ~/.bashrc -source ~/.bashrc -pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple +python -m pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple # install cuda/cudnn cd /tmp @@ -144,8 +143,8 @@ set +e && source ~/.bashrc set -e # wheel -pip install wheel +python -m pip install wheel # python 3.9 needs setuptools>44.0 -pip install -U setuptools +python -m pip install -U setuptools echo "The environment is ready to clone and compile mindspore."