安装NPU、CANN、MindStudio、框架前配置
批量安装NPU驱动固件、CANN、MindStudio、框架、toolbox前需要参考以下操作完成配置。
单机安装请跳过本章节。
- 登录Ascend Deployer所在服务器。
- 在Ascend Deployer所在服务器上配置待安装的其他设备的IP地址、用户名。
进入ascend-deployer/ascend_deployer目录,编辑inventory_file文件,在[worker]下面需注释或删除“localhost ansible_connection='local'”内容,新增执行Ascend Deployer工具所在设备和待安装设备的IP地址、用户名,添加完成后执行:wq保存退出。格式参考如下:
[worker] ip_address_1 ansible_ssh_user="root" # root用户 ip_address_2 ansible_ssh_user="root" # root用户
(可选)安装npu时,在[worker]下面可增加npu_num相关说明(非必填),示例如下:
[worker] ip_address_1 ansible_ssh_user="root" npu_num="请替换为npu卡的数量" # root用户 ip_address_2 ansible_ssh_user="root" npu_num="请替换为npu卡的数量" # root用户
- ip_address支持配置IPv4和IPv6两种类型的IP地址,用户使用PuTTY等SSH客户端连接执行机的IP地址和inventory_file文件中配置的IP地址类型需要保持统一,均为IPv4或IPv6。
- inventory_file文件中支持指定ansible_ssh_pass字段配置其他待安装设备的密码进行SSH密码认证,若已使用SSH密钥认证方式连接,则无需再配置。
- inventory_file文件中[all:vars]下提供了可选字段RUNNER_IP,可配置为执行Ascend Deployer所在设备的IP地址,请注意该IP需与其他待安装设备互通。建议在执行机含有多网段多个本机IP时配置该字段。
- 在Atlas A2 训练系列产品、Atlas 800I A2推理产品上,批量安装固件与驱动、CANN软件包时,可通过填写excel表格的方式来导入inventory文件所需参数:
下载表格:表格名称为inventory_template.xls,随Ascend Deployer安装软件包一起下载,并存放于ascend_deloyer目录下。
使用表格:
- 请详细阅读表格填写说明,按照要求将表格填写完整。
- 将填写完成的表格另存为CSV UTF-8的格式。
- 将另存为的CSV文件,放入ascend_deployer的目录下。
- 执行脚本trans_excel_to_inventory.bat(该脚本同样存放于ascend_deloyer目录下),提取CSV的内容存入inventory_file。
- 进入ascend_deployer目录,执行bash install.sh --check测试待安装设备连通性和是否支持使用Ascend Deployer工具。
确保所有设备都能正常连接,若存在设备连接失败情况,请检查该设备的网络连接和sshd服务是否开启。
父主题: 配置批量安装