fix pip auto install scripts

This commit is contained in:
xulei 2022-03-30 09:27:27 +08:00
parent 693af7f260
commit 5cd0495eb0
6 changed files with 14 additions and 16 deletions

View File

@ -104,7 +104,8 @@ curl -O "https://cmake.org/files/v3.19/${cmake_file_name}"
sudo mkdir $HOME/cmake-3.19.8 sudo mkdir $HOME/cmake-3.19.8
sudo bash cmake-3.19.8-Linux-*.sh --prefix=$HOME/cmake-3.19.8 --exclude-subdir 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 add_env PATH $HOME/cmake-3.19.8/bin
source ~/.bashrc set +e && source ~/.bashrc
set -e
cd - cd -
# optional openmpi for distributed training # optional openmpi for distributed training

View File

@ -108,7 +108,8 @@ curl -O "https://cmake.org/files/v3.19/${cmake_file_name}"
sudo mkdir $HOME/cmake-3.19.8 sudo mkdir $HOME/cmake-3.19.8
sudo bash cmake-3.19.8-Linux-*.sh --prefix=$HOME/cmake-3.19.8 --exclude-subdir 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 add_env PATH $HOME/cmake-3.19.8/bin
source ~/.bashrc set +e && source ~/.bashrc
set -e
cd - cd -
ARCH=`uname -m` ARCH=`uname -m`

View File

@ -64,12 +64,11 @@ sudo update-alternatives --install /usr/bin/python python /usr/bin/python$PYTHON
# pip # pip
python -m pip install -U pip -i https://pypi.tuna.tsinghua.edu.cn/simple python -m pip install -U pip -i https://pypi.tuna.tsinghua.edu.cn/simple
echo -e "alias pip='python -m pip'" >> ~/.bashrc echo -e "alias pip='python -m pip'" >> ~/.bashrc
source ~/.bashrc python -m pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
# install mindspore whl # install mindspore whl
arch=`uname -m` 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 # check mindspore installation
python -c "import mindspore;mindspore.run_check()" python -c "import mindspore;mindspore.run_check()"

View File

@ -70,12 +70,11 @@ sudo update-alternatives --install /usr/bin/python python /usr/bin/python$PYTHON
# pip # pip
python -m pip install -U pip -i https://pypi.tuna.tsinghua.edu.cn/simple python -m pip install -U pip -i https://pypi.tuna.tsinghua.edu.cn/simple
echo -e "alias pip='python -m pip'" >> ~/.bashrc echo -e "alias pip='python -m pip'" >> ~/.bashrc
source ~/.bashrc python -m pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
# wheel # wheel
pip install wheel python -m pip install wheel
# python 3.9 needs setuptools>44.0 # 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." echo "The environment is ready to clone and compile mindspore."

View File

@ -94,8 +94,7 @@ sudo update-alternatives --install /usr/bin/python python /usr/bin/python$PYTHON
# pip # pip
python -m pip install -U pip -i https://pypi.tuna.tsinghua.edu.cn/simple python -m pip install -U pip -i https://pypi.tuna.tsinghua.edu.cn/simple
echo -e "alias pip='python -m pip'" >> ~/.bashrc echo -e "alias pip='python -m pip'" >> ~/.bashrc
source ~/.bashrc python -m pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
# install cuda/cudnn # install cuda/cudnn
cd /tmp cd /tmp
@ -138,7 +137,7 @@ if [[ X"$OPENMPI" == "Xon" ]]; then
fi fi
arch=`uname -m` 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 # check mindspore installation
python -c "import mindspore;mindspore.run_check()" python -c "import mindspore;mindspore.run_check()"

View File

@ -113,8 +113,7 @@ sudo update-alternatives --install /usr/bin/python python /usr/bin/python$PYTHON
# pip # pip
python -m pip install -U pip -i https://pypi.tuna.tsinghua.edu.cn/simple python -m pip install -U pip -i https://pypi.tuna.tsinghua.edu.cn/simple
echo -e "alias pip='python -m pip'" >> ~/.bashrc echo -e "alias pip='python -m pip'" >> ~/.bashrc
source ~/.bashrc python -m pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
# install cuda/cudnn # install cuda/cudnn
cd /tmp cd /tmp
@ -144,8 +143,8 @@ set +e && source ~/.bashrc
set -e set -e
# wheel # wheel
pip install wheel python -m pip install wheel
# python 3.9 needs setuptools>44.0 # 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." echo "The environment is ready to clone and compile mindspore."