forked from mindspore-Ecosystem/mindspore
fix pip auto install scripts
This commit is contained in:
parent
693af7f260
commit
5cd0495eb0
|
@ -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
|
||||
|
|
|
@ -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`
|
||||
|
|
|
@ -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()"
|
||||
|
|
|
@ -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."
|
||||
|
|
|
@ -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()"
|
||||
|
|
|
@ -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."
|
||||
|
|
Loading…
Reference in New Issue