use conda-forge channel in conda create

This commit is contained in:
xulei 2022-04-06 17:44:33 +08:00
parent 9be89d1b2a
commit 0703b9d134
6 changed files with 29 additions and 17 deletions

View File

@ -110,8 +110,12 @@ set -e
# set up conda env
env_name=mindspore_py3${PYTHON_VERSION##*.}
conda create -n $env_name python=${PYTHON_VERSION} -y
conda create -n $env_name python=${PYTHON_VERSION} -c conda-forge -y
conda activate $env_name
# downgrade openssl when py3.9+310
if [[ "$PYTHON_VERSION" == "3.9" ]]; then
conda install openssl=1.1.1 -y
fi
pip install sympy
pip install ${LOCAL_ASCEND}/ascend-toolkit/latest/fwkacllib/lib64/topi-*-py3-none-any.whl

View File

@ -110,7 +110,7 @@ set -e
# set up conda env
env_name=mindspore_py3${PYTHON_VERSION##*.}
conda create -n $env_name python=${PYTHON_VERSION} -y
conda create -n $env_name python=${PYTHON_VERSION} -c conda-forge -y
conda activate $env_name
pip install sympy

View File

@ -98,8 +98,12 @@ set -e
# set up conda env
env_name=mindspore_py3${PYTHON_VERSION##*.}
conda create -n $env_name python=${PYTHON_VERSION} -y
conda create -n $env_name python=${PYTHON_VERSION} -c conda-forge -y
conda activate $env_name
# downgrade openssl when py3.9+310
if [[ "$PYTHON_VERSION" == "3.9" ]]; then
conda install openssl=1.1.1 -y
fi
pip install wheel
pip install -U setuptools

View File

@ -71,6 +71,17 @@ add_env() {
sudo yum install gcc gmp-devel -y
# cmake
cd /tmp
cmake_file_name="cmake-3.19.8-Linux-$(arch).sh"
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
set +e && source ~/.bashrc
set -e
cd -
install_conda() {
conda_file_name="Miniconda3-py3${PYTHON_VERSION##*.}_4.10.3-Linux-$(arch).sh"
cd /tmp
@ -109,24 +120,17 @@ set -e
# set up conda env
env_name=mindspore_py3${PYTHON_VERSION##*.}
conda create -n $env_name python=${PYTHON_VERSION} -y
conda create -n $env_name python=${PYTHON_VERSION} -c conda-forge -y
conda activate $env_name
# downgrade openssl when py3.9+310
if [[ "$PYTHON_VERSION" == "3.9" ]]; then
conda install openssl=1.1.1 -y
fi
pip install sympy
pip install ${LOCAL_ASCEND}/ascend-toolkit/latest/fwkacllib/lib64/topi-*-py3-none-any.whl
pip install ${LOCAL_ASCEND}/ascend-toolkit/latest/fwkacllib/lib64/te-*-py3-none-any.whl
pip install ${LOCAL_ASCEND}/ascend-toolkit/latest/fwkacllib/lib64/hccl-*-py3-none-any.whl
# cmake
cd /tmp
cmake_file_name="cmake-3.19.8-Linux-$(arch).sh"
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
set +e && source ~/.bashrc
set -e
cd -
ARCH=`uname -m`
pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/${MINDSPORE_VERSION}/MindSpore/ascend/${ARCH}/mindspore_ascend-${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

View File

@ -100,7 +100,7 @@ set -e
# set up conda env and install mindspore-cpu
env_name=mindspore_py3${PYTHON_VERSION##*.}
conda create -n $env_name python=${PYTHON_VERSION} -y
conda create -n $env_name python=${PYTHON_VERSION} -c conda-forge -y
conda activate $env_name
install_name="mindspore-cpu"
if [[ $MINDSPORE_VERSION != "EMPTY" ]]; then

View File

@ -164,7 +164,7 @@ env_name=mindspore_py3${PYTHON_VERSION##*.}
declare -A cudnn_version_map=()
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 create -n $env_name python=${PYTHON_VERSION} -c conda-forge -y
conda activate $env_name
install_name="mindspore-gpu"
if [[ $MINDSPORE_VERSION != "EMPTY" ]]; then