external-gitcode-ascend-ascend-npu-driver-install

For performing installation and deployment of Ascend NPU drivers and firmware. Supports extracting installation packages by regex matching, adding executable permissions as needed, dual package verification using Python and Shell, prior checking and installation of system dependencies before installation, and is compatible with CentOS/RHEL/Ubuntu/Debian operating systems. Intended for Ascend NPU driver and firmware installation and deployment.

Last repository push
GitHub Stars
187
Forks
67
Issues / PRs
15

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "external-gitcode-ascend-ascend-npu-driver-install" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-a6dd890cfcc6997d80969615639a5f921e329fd6d2fa7c0ddd977b72cad6d16a. Verify the upstream source and version against https://github.com/ascend-ai-coding/awesome-ascend-skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

For performing installation and deployment of Ascend NPU drivers and firmware. Supports extracting installation packages by regex matching, adding executable permissions as needed, dual package verification using Python and Shell, prior checking and installation of system dependencies before installation, and is compatible with CentOS/RHEL/Ubuntu/Debian operating systems. Intended for Ascend NPU driver and firmware installation and deployment.

0 Downloads

Introduction source: third_party · ascend-ai-coding · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Software, accounts and paid services
Translation pending; see source documentation.
Limits and differences
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: external-gitcode-ascend-ascend-npu-driver-install
description: 能完成昇腾NPU驱动和固件安装部署,实现安装包正则匹配提取、按需添加可执行权限、Python+Shell双重包校验、系统依赖先验后装、适配CentOS/RHEL/Ubuntu/Debian系统,适用于昇腾NPU驱动和固件安装部署。
metadata:
  author: ascend-deploy-team
  version: 1.0.0
  supported-chip: Ascend310P/Ascend910A/Ascend910B
  core-scripts: check_package.py,install_npu_driver.sh
  skill-type: hardware-deploy
allowed-tools: Bash(*) Python3(*)
original-name: ascend-npu-driver-install
synced-from: https://gitcode.com/Ascend/agent-skills
synced-date: '2026-05-26'
synced-commit: 1f7666e7768a0ceb21bb1d40ce4b5179fcb6f1d6
license: UNKNOWN

Ascend NPU Driver & Firmware Auto-Install

该技能为提供端到端自动化的NPU驱动和固件安装能力,覆盖从安装包校验到驱动生效验证的全流程,无需手动分步操作,严格遵循昇腾官方安装规范,适配主流Linux发行版。

核心能力

  1. 基于官方正则自动提取指定文件夹内的驱动/固件包,强制校验包数量唯一性,仅允许1个驱动包+1个固件包;
  2. 安装包可执行权限按需赋权,无权限时自动执行chmod +x并二次校验赋权结果,避免权限问题导致安装失败;
  3. Python+Shell双重包校验,提前验证包格式、路径、文件有效性,拦截无效安装包;
  4. 系统依赖先验后装
  5. 严格按昇腾官方先驱动后固件顺序安装,安装后提供交互式重启选项+官方npu-smi原生命令验证驱动状态。

前置准备

  • 该版本无需校验系内核,直接进行部署即可

    1. 脚本文件准备

    将核心脚本check_package.py(Python包校验)和install_npu_driver.sh(Shell主安装)放在同一目录,本技能的根目录建议命名为ascend-npu-driver-install,与name字段保持一致。

2. 安装包要求

指定的安装包文件夹内仅存放1个符合昇腾官方命名格式的驱动.run包和1个固件.run包,无其他无关文件,包名格式严格遵循:

  • 驱动包:Ascend-hdk-<chip_type>-npu-driver_<version>_linux-<arch>.run
  • 固件包:Ascend-hdk-<chip_type>-npu-firmware_<version>.run

3. 系统环境要求

  • 权限:必须拥有ROOT管理员权限,可通过sudo -i命令切换;
  • 系统:适配CentOS/RHEL、Ubuntu/Debian系列Linux发行版,支持yum/apt包管理器;
  • 基础环境:系统已预装Python3,离线无网络环境需手动提前安装gcc、make、dkms核心依赖;
  • 硬件:适配昇腾Ascend310P、Ascend910A、Ascend910B系列NPU芯片。

快速使用步骤

限制要求

  • 安装包的参数仅支持 --full、--install、--install-for-all

步骤1:为脚本添加可执行权限

进入脚本所在的技能根目录,执行以下命令为两个核心脚本赋予可执行权限:

chmod +x ./scripts/install_npu_driver.sh ./scripts/check_package.py

步骤2:执行自动化安装脚本

命令格式:./scripts/install_npu_driver.sh <NPU包文件夹完整路径> <驱动运行用户> 推荐示例(使用root用户进行安装):

./scripts/install_npu_driver.sh /opt/ascend/npu_pkgs root

步骤3:系统重启(驱动生效必做)

安装完成后脚本会弹出交互式重启提示,NPU驱动和固件生效必须重启系统,无重启则无法完成驱动加载:

  • 输入y:系统立即重启,完成NPU驱动内核加载;
  • 输入n:跳过立即重启,后续需手动执行reboot命令完成系统重启。

    步骤 4:验证安装结果

    系统重启后,执行昇腾官方原生命令验证 NPU 驱动加载状态:

    npu-smi info

    安装成功标识:命令输出内容包含NPU 芯片型号、Driver Version(驱动版本)、Firmware Version(固件版本),无任何报错信息。

    核心脚本说明

    check_package.py(Python 包校验脚本) 由 Shell 主脚本自动调用,无需手动执行,核心完成以下包校验工作: 检查安装包所在文件夹是否存在; 按昇腾官方正则匹配驱动 / 固件包,校验包数量唯一性; 验证包为有效文件(非目录); 检测包的可执行权限,无权限时给出警告提示; 输出校验通过的驱动 / 固件包完整绝对路径,供 Shell 脚本调用。 install_npu_driver.sh(Shell 主安装脚本) 技能核心执行脚本,按固定流程自动化运行,全程无需人工干预,执行流程为:ROOT/Python3环境检查 → 包路径正则提取 → 包可执行权限按需赋权 → Python包二次校验 → 运行用户/组自动创建 → 系统依赖先验后装 → NPU驱动安装 → NPU固件安装 → 交互式重启确认 → npu-smi原生验证

Current listing version

1.0.0

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 提供昇腾NPU驱动和固件的端到端自动化安装能力,覆盖从包校验到驱动生效验证的全流程
  • 适配主流Linux发行版(CentOS/RHEL/Ubuntu/Debian),支持昇腾Ascend310P/Ascend910A/Ascend910B系列芯片
  • 严格遵循昇腾官方安装规范,解决用户在AI硬件部署中的实际痛点
Trigger Precision95/100

Highlights

  • description字段明确描述了技能的核心能力、支持的功能、适配的操作系统以及适用场景
  • 触发词精准完整,边界清晰,用户能准确理解其用途
Structure and Standards95/100

Highlights

  • 文档结构清晰,包含核心能力、前置准备、快速使用步骤、核心脚本说明等章节
  • 有明确的步骤划分、具体的命令示例、出口条件和完整的frontmatter
Execution Reliability95/100

Highlights

  • 脚本来源明确(昇腾官方agent-skills仓库),参数说明清晰
  • 覆盖了主要异常处理(权限、环境、包校验、依赖),不可逆操作有交互式确认机制
Evidence Verifiability (mean of the first four)93/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • gitcode.com

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Translation pending; see source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.