!32149 fix mindspore install version in conda and pip scripts

Merge pull request !32149 from xulei/scripts
This commit is contained in:
i-robot 2022-03-29 03:34:32 +00:00 committed by Gitee
commit 893a34a3b3
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
8 changed files with 55 additions and 25 deletions

View File

@ -22,7 +22,7 @@
#
# Augments:
# - PYTHON_VERSION: python version to set up. [3.7(default), 3.8, 3.9]
# - MINDSPORE_VERSION: mindspore version to install, default 1.6.0
# - MINDSPORE_VERSION: mindspore version to install
# - OPENMPI: whether to install optional package Open MPI for distributed training. [on, off(default)]
#
# Usage:
@ -32,7 +32,7 @@
set -e
PYTHON_VERSION=${PYTHON_VERSION:-3.7}
MINDSPORE_VERSION=${MINDSPORE_VERSION:-1.6.0}
MINDSPORE_VERSION=${MINDSPORE_VERSION:-EMPTY}
OPENMPI=${OPENMPI:-off}
available_py_version=(3.7 3.8 3.9)
@ -92,4 +92,8 @@ env_name=mindspore_py3${PYTHON_VERSION##*.}
conda create -n $env_name python=${PYTHON_VERSION} -y
conda activate $env_name
conda install mindspore-ascend -c mindspore -c conda-forge
install_name="mindspore-ascend"
if [[ $MINDSPORE_VERSION != "EMPTY" ]]; then
install_name="${install_name}=${MINDSPORE_VERSION}"
fi
conda install ${install_name} -c mindspore -c conda-forge -y

View File

@ -22,19 +22,24 @@
#
# Augments:
# - PYTHON_VERSION: python version to set up. [3.7(default), 3.8, 3.9]
# - MINDSPORE_VERSION: mindspore version to install, default 1.6.0
# - MINDSPORE_VERSION: mindspore version to install, required
# - OPENMPI: whether to install optional package Open MPI for distributed training. [on, off(default)]
#
# Usage:
# Run script like `bash ./euleros-ascend-pip.sh`.
# Run script like `MINDSPORE_VERSION=1.6.1 bash ./euleros-ascend-pip.sh`.
# To set augments, run it as `PYTHON_VERSION=3.9 MINDSPORE_VERSION=1.5.0 bash ./euleros-ascend-pip.sh`.
set -e
PYTHON_VERSION=${PYTHON_VERSION:-3.7}
MINDSPORE_VERSION=${MINDSPORE_VERSION:-1.6.0}
MINDSPORE_VERSION=${MINDSPORE_VERSION:-EMPTY}
OPENMPI=${OPENMPI:-off}
if [[ $MINDSPORE_VERSION == "EMPTY" ]]; then
echo "MINDSPORE_VERSION not set, please check available versions at https://www.mindspore.cn/versions."
exit 1
fi
available_py_version=(3.7 3.8 3.9)
if [[ " ${available_py_version[*]} " != *" $PYTHON_VERSION "* ]]; then
echo "PYTHON_VERSION is '$PYTHON_VERSION', but available versions are [${available_py_version[*]}]."

View File

@ -22,17 +22,15 @@
#
# Augments:
# - PYTHON_VERSION: python version to set up. [3.7(default), 3.8, 3.9]
# - MINDSPORE_VERSION: mindspore version to install, default 1.6.0
# - OPENMPI: whether to install optional package Open MPI for distributed training. [on, off(default)]
#
# Usage:
# Run script like `bash -i ./euleros-ascend-source.sh`.
# To set augments, run it as `PYTHON_VERSION=3.9 MINDSPORE_VERSION=1.5.0 bash -i ./euleros-ascend-source.sh`.
# To set augments, run it as `PYTHON_VERSION=3.9 bash -i ./euleros-ascend-source.sh`.
set -e
PYTHON_VERSION=${PYTHON_VERSION:-3.7}
MINDSPORE_VERSION=${MINDSPORE_VERSION:-1.6.0}
OPENMPI=${OPENMPI:-off}
available_py_version=(3.7 3.8 3.9)

View File

@ -22,18 +22,23 @@
#
# Augments:
# - PYTHON_VERSION: python version to set up. [3.7(default), 3.8, 3.9]
# - MINDSPORE_VERSION: mindspore version to install, default 1.6.0
# - MINDSPORE_VERSION: mindspore version to install, required
#
# Usage:
# Run script like `bash ./euleros-ascend310-pip.sh`.
# Run script like `MINDSPORE_VERSION=1.6.1 bash ./euleros-ascend310-pip.sh`.
# To set augments, run it as `PYTHON_VERSION=3.9 MINDSPORE_VERSION=1.5.0 bash ./euleros-ascend310-pip.sh`.
set -e
PYTHON_VERSION=${PYTHON_VERSION:-3.7}
MINDSPORE_VERSION=${MINDSPORE_VERSION:-1.6.0}
MINDSPORE_VERSION=${MINDSPORE_VERSION:-EMPTY}
OPENMPI=${OPENMPI:-off}
if [[ $MINDSPORE_VERSION == "EMPTY" ]]; then
echo "MINDSPORE_VERSION not set, please check available versions at https://www.mindspore.cn/versions."
exit 1
fi
available_py_version=(3.7 3.8 3.9)
if [[ " ${available_py_version[*]} " != *" $PYTHON_VERSION "* ]]; then
echo "PYTHON_VERSION is '$PYTHON_VERSION', but available versions are [${available_py_version[*]}]."

View File

@ -24,7 +24,7 @@
#
# Augments:
# - PYTHON_VERSION: python version to set up. [3.7(default), 3.8, 3.9]
# - MINDSPORE_VERSION: mindspore version to install, default 1.6.0
# - MINDSPORE_VERSION: mindspore version to install
#
# Usage:
# Run script like `bash ./ubuntu-cpu-conda.sh`.
@ -33,7 +33,7 @@
set -e
PYTHON_VERSION=${PYTHON_VERSION:-3.7}
MINDSPORE_VERSION=${MINDSPORE_VERSION:-1.6.0}
MINDSPORE_VERSION=${MINDSPORE_VERSION:-EMPTY}
available_py_version=(3.7 3.8 3.9)
if [[ " ${available_py_version[*]} " != *" $PYTHON_VERSION "* ]]; then
@ -88,7 +88,11 @@ set -e
env_name=mindspore_py3${PYTHON_VERSION##*.}
conda create -n $env_name python=${PYTHON_VERSION} -y
conda activate $env_name
conda install mindspore-cpu=${MINDSPORE_VERSION} -c mindspore -c conda-forge -y
install_name="mindspore-cpu"
if [[ $MINDSPORE_VERSION != "EMPTY" ]]; then
install_name="${install_name}=${MINDSPORE_VERSION}"
fi
conda install ${install_name} -c mindspore -c conda-forge -y
# check mindspore installation
python -c "import mindspore;mindspore.run_check()"

View File

@ -24,16 +24,21 @@
#
# Augments:
# - PYTHON_VERSION: python version to install. [3.7(default), 3.8, 3.9]
# - MINDSPORE_VERSION: mindspore version to install, default 1.6.0
# - MINDSPORE_VERSION: mindspore version to install, required
#
# Usage:
# Run script like `bash ./ubuntu-cpu-pip.sh`.
# Run script like `MINDSPORE_VERSION=1.6.1 bash ./ubuntu-cpu-pip.sh`.
# To set augments, run it as `PYTHON_VERSION=3.9 MINDSPORE_VERSION=1.5.0 bash ./ubuntu-cpu-pip.sh`.
set -e
PYTHON_VERSION=${PYTHON_VERSION:-3.7}
MINDSPORE_VERSION=${MINDSPORE_VERSION:-1.6.0}
MINDSPORE_VERSION=${MINDSPORE_VERSION:-EMPTY}
if [[ $MINDSPORE_VERSION == "EMPTY" ]]; then
echo "MINDSPORE_VERSION not set, please check available versions at https://www.mindspore.cn/versions."
exit 1
fi
available_py_version=(3.7 3.8 3.9)
if [[ " ${available_py_version[*]} " != *" $PYTHON_VERSION "* ]]; then

View File

@ -25,7 +25,7 @@
#
# Augments:
# - PYTHON_VERSION: python version to install. [3.7(default), 3.8, 3.9]
# - MINDSPORE_VERSION: mindspore version to install, default 1.6.0
# - MINDSPORE_VERSION: mindspore version to install
# - CUDA_VERSION: CUDA version to install. [10.1, 11.1(default)]
# - OPENMPI: whether to install optional package Open MPI for distributed training. [on, off(default)]
#
@ -36,7 +36,7 @@
set -e
PYTHON_VERSION=${PYTHON_VERSION:-3.7}
MINDSPORE_VERSION=${MINDSPORE_VERSION:-1.6.0}
MINDSPORE_VERSION=${MINDSPORE_VERSION:-EMPTY}
CUDA_VERSION=${CUDA_VERSION:-11.1}
OPENMPI=${OPENMPI:-off}
@ -151,7 +151,11 @@ cudnn_version_map["10.1"]="7.6.5"
cudnn_version_map["11.1"]="8.1.0"
conda create -n $env_name python=${PYTHON_VERSION} -y
conda activate $env_name
conda install mindspore-gpu=${MINDSPORE_VERSION} \
install_name="mindspore-gpu"
if [[ $MINDSPORE_VERSION != "EMPTY" ]]; then
install_name="${install_name}=${MINDSPORE_VERSION}"
fi
conda install ${install_name} \
cudatoolkit=${CUDA_VERSION} cudnn=${cudnn_version_map[$CUDA_VERSION]} -c mindspore -c conda-forge -y
# check mindspore installation

View File

@ -26,21 +26,26 @@
#
# Augments:
# - PYTHON_VERSION: python version to install. [3.7(default), 3.8, 3.9]
# - MINDSPORE_VERSION: mindspore version to install, default 1.6.0
# - MINDSPORE_VERSION: mindspore version to install, required
# - CUDA_VERSION: CUDA version to install. [10.1, 11.1(default)]
# - OPENMPI: whether to install optional package Open MPI for distributed training. [on, off(default)]
#
# Usage:
# Run script like `bash -i ./ubuntu-gpu-pip.sh`.
# To set augments, run it as `PYTHON_VERSION=3.9 CUDA_VERSION=10.1 OPENMPI=on bash -i ./ubuntu-gpu-pip.sh`.
# Run script like `MINDSPORE_VERSION=1.6.1 bash -i ./ubuntu-gpu-pip.sh`.
# To set augments, run it as `MINDSPORE_VERSION=1.5.0 CUDA_VERSION=10.1 OPENMPI=on bash -i ./ubuntu-gpu-pip.sh`.
set -e
PYTHON_VERSION=${PYTHON_VERSION:-3.7}
MINDSPORE_VERSION=${MINDSPORE_VERSION:-1.6.0}
MINDSPORE_VERSION=${MINDSPORE_VERSION:EMPTY}
CUDA_VERSION=${CUDA_VERSION:-11.1}
OPENMPI=${OPENMPI:-off}
if [[ $MINDSPORE_VERSION == "EMPTY" ]]; then
echo "MINDSPORE_VERSION not set, please check available versions at https://www.mindspore.cn/versions."
exit 1
fi
available_py_version=(3.7 3.8 3.9)
if [[ " ${available_py_version[*]} " != *" $PYTHON_VERSION "* ]]; then
echo "PYTHON_VERSION is '$PYTHON_VERSION', but available versions are [${available_py_version[*]}]."