Open jianyunchao opened 1 year ago
https://www.mindspore.cn/install
mindspore 2.0.0的cann社区版为例:
点击“固件和驱动”超链接,搜索6.3.RC1.alpha003版本下载,我这边执行arch是aarch64操作系统,对应是服务器的9000,下载对应driver和firmware的run包即可
https://www.hiascend.com/hardware/firmware-drivers?tag=community
点击“CANN社区版”超链接,搜索6.3.RC1.alpha003版本下载,我的需求是910训练,下载对应toolkit的run包
https://www.hiascend.com/software/cann/community-history
在root用户下,安装driver
首次安装,新增HwHiAiUser用户组和用户 groupadd HwHiAiUser useradd -g HwHiAiUser -d /home/HwHiAiUser -m HwHiAiUser -s /bin/bash
当出现 Reboot now or after driver installation for the installation/upgrade to take effect. 需要reboot重启
在root用户下,安装firmware
当出现 Reboot now or after driver installation for the installation/upgrade to take effect. 需要reboot重启
安装完成driver和firmware,执行命令npu-smi info验证是否成功
root登录,安装toolkit包
[Toolkit] [2023-08-09 07:07:28] [ERROR]: usergroup=root not right! Please check the relatianship of group1 and root [Toolkit] [2023-08-09 07:07:28] [INFO]: End Time: 2023-08-09 07:07:28 [Toolkit] [20230809-07:07:29] [WARNING] delete operation, the /usr/local/Ascend/ascend-toolkit is not exist or not directory. [Toolkit] [20230809-07:07:29] [ERROR] CANN-toolkit-6.4.12.1.241-linux.aarch64.run install failed [Toolkit] [20230809-07:07:29] [ERROR] package install failed, Please refer to the log for more details: /var/log/ascend_seclog/ascend_toolkit_install.log [Toolkit] [20230809-07:07:29] [ERROR] process exit
解决方法: 直接用root登录操作
解决方法: groupadd HwHiAiUser useradd -g HwHiAiUser -d /home/HwHiAiUser -m HwHiAiUser -s /bin/bash
解决方法:
apt install net-tools
解决方法: apt install build-essential -y apt install cmake -y apt install dkms -y
下载官网对应系统的miniconda 直接执行 bash Miniconda3-latest-Linux-aarch64.sh 一直enter下一步,yes,使用默认安装路径
激活环境变量 source ~/.bashrc
新建conda环境 conda create -n ms21_py38 python=3.8 -y
执行命令: mkdir ~/.pip vim ~/.pip/pip.conf 写入: [global] index-url = https://pypi.tuna.tsinghua.edu.cn/simple [install] trusted-host = https://pypi.tuna.tsinghua.edu.cn/ timeout = 120
python -m pip install -U pip
pip install sympy pip install /usr/local/Ascend/ascend-toolkit/latest/lib64/te--py3-none-any.whl pip install /usr/local/Ascend/ascend-toolkit/latest/lib64/hccl--py3-none-any.whl
export MS_VERSION=2.1.0 pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/${MS_VERSION}/MindSpore/unified/aarch64/mindspore-${MS_VERSION/-/}-cp37-cp37m-linux_aarch64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple
python -c "import mindspore;mindspore.set_context(device_target='Ascend');mindspore.run_check()"
910逻辑,没有固件驱动,从头开始操作
已经安装好固件驱动,从这里开始: https://github.com/jianyunchao/mindlearning/issues/5#issuecomment-1670808750