物理机和容器部署场景,只需要在物理机安装NPU驱动固件。
虚拟机部署场景,除了在物理机安装NPU驱动固件外,还需要在虚拟机安装NPU驱动。
如果命令执行报错或者等待时间过长,则检查网络是否连接或修改“/etc/apt/sources.list”文件为可用源(以配置华为镜像源为例,可参考华为开源镜像站中镜像源对应的配置方法操作)。
yum makecache
如果命令执行报错或者等待时间过长,则检查网络是否连接或修改“/etc/yum.repos.d/xxxx.repo”文件为可用源(以配置华为镜像源为例,可参考华为开源镜像站中镜像源对应的配置方法操作)。
yum install -y make dkms gcc kernel-headers-$(uname -r) kernel-devel-$(uname -r)
如果出现报错,或者依赖不存在请参考安装驱动源码编译所需依赖解决。
chmod +x Ascend-hdk-<chip_type>-npu-driver_<version>_linux-<arch>.run chmod +x Ascend-hdk-<chip_type>-npu-firmware_<version>.run ./Ascend-hdk-<chip_type>-npu-driver_<version>_linux-<arch>.run --check ./Ascend-hdk-<chip_type>-npu-firmware_<version>.run --check
出现如下回显信息,表示软件包校验成功。
Verifying archive integrity... 100% SHA256 checksums are OK. All good.
./Ascend-hdk-<chip_type>-npu-driver_<version>_linux-<arch>.run --full --install-for-all
Driver package installed successfully!
[ERROR]The list of missing tools: lspci,ifconfig
[ERROR]Dkms install failed, details in : var/log/ascend_seclog/ascend_install.log. [ERROR]Driver_ko_install failed, details in : /var/log/ascend_seclog/ascend_install.log.
./Ascend-hdk-<chip_type>-npu-firmware_<version>.run --full
若系统出现如下关键回显信息,表示固件安装成功。
Firmware package installed successfully! Reboot now or after driver installation for the installation/upgrade to take effect
如果创建的运行用户和运行用户组是非HwHiAiUser(含root),安装驱动固件包时必须指定运行用户,示例命令如下,如果对运行用户名称没有特殊要求,建议使用HwHiAiUser。
./Ascend-hdk-<chip_type>-npu-driver_<version>_linux-<arch>.run --full --install-username=<username> --install-usergroup=<usergroup>
reboot
npu-smi info
若返回驱动相关信息说明加载成功。否则,说明加载失败。请访问支持与服务在论坛求助或提交技术工单。