skills/drivingsdk-ascend-model-migration/ascend-mmlab-install-suite/detectron2/SKILL.md
在昇腾NPU容器中从源码安装detectron2。适用于实例分割、目标检测等模型的开发。
npx skillsauth add Ascend/agent-skills ascend-detectron2-installInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
在昇腾NPU容器中从源码安装 detectron2(NPU兼容版本)
确保 mmcv 已安装:
python -c "import mmcv; print(mmcv.__version__)"
关键:在NPU环境下必须从源码安装,不能使用预编译的CUDA版本!
source /opt/conda/bin/activate <conda-env-name>
pip install git+https://github.com/facebookresearch/detectron2.git
python -c "import detectron2; print('detectron2 installed')"
NPU验证(关键步骤):
python -c "import site; print([p for p in site.getsitepackages() if 'cuda' in p.lower()])"
# 应输出空列表,确保没有安装CUDA版本
如果输出包含 cuda 相关路径,说明安装的是 CUDA 版本,需要卸载并重新从源码安装:
pip uninstall detectron2 -y
pip install git+https://github.com/facebookresearch/detectron2.git
向用户提问:
安装后必须验证:
testing
Kubernetes 集群健康检查与安全修复 — 诊断问题,用户确认后执行修复
tools
昇腾NPU CANN Toolkit+Kernels+NNAL安装部署技能。支持从官网下载run包安装和从Docker镜像提取两种方式,覆盖驱动检查、包下载、安装、环境变量配置与验证全流程。当用户需要安装CANN全套组件或指定版本CANN到自定义路径时调用。
development
编译 ATB (Ascend Transformer Boost) 测试框架。当用户需要编译 ATB 测试框架、 运行 CSV 测试、或构建 atb_test_framework 时调用。支持全量编译(含第三方依赖克隆与源替换) 和增量编译两种模式。需在 Docker 容器内配合 CANN 环境执行。
databases
ATB OPS→ACLNN 迁移标准化工作流主模板。整合前置学习、设计文档生成、CSV用例设计、 实际迁移、编译验证、测试验证全流程,提供明确的阶段 Gates 和用户确认机制。