已合并
docs: optimize devcontainer configuration and documentation #1567
zhugexun_sjtu创建于 4月13日
docs: optimize devcontainer configuration and documentation #1567
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 zhugexun_sjtu 的贡献)4月13日 创建了 pull request,commit abb90d94
CANN-robot
4月13日 评论:
4月13日 评论:
Thanks for your pull-request.
The full list of commands accepted by me can be found at here。
You can get sig-info at here
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| repo-cann/asc-devkit | ✅ sjtulxh, XuebinYang (2/2) | ✅ sjtulxh (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
xun_zhuge, thanks for your pull request. All authors of the commits have signed the CLA. 👍


4月13日 添加了label:cann-cla/yes
此处折叠了9条事件消息 查看更多
4月13日 修改了pull request 的描述
zhugexun_sjtu
4月13日 评论:
4月13日 评论:
compile


4月13日 添加了label:ci-pipeline-running
CANN-robot
4月13日 评论:
4月13日 评论:
流水线任务触发成功
任务链接 [9338efbea14648a2a19615dc3fd98c46][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| SCA | ✅ SUCCESS | >>>>> | |
| anti_virus | ✅ SUCCESS | >>>>> | |
| codecheck | ✅ SUCCESS | ||
| Check_Pr | ✅ SUCCESS | >>>>> | |
| pre_comment | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_ubuntu24 | ✅ SUCCESS | >>>>> | |
| StaticCheck_codespell_check | ⚠️ WARNING | >>>>> | |
| StaticCheck_link_validity_check | ⚠️ WARNING | >>>>> | |
| StaticCheck_resource_existence_check | ✅ SUCCESS | ||
| StaticCheck_tag_closed_check | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS | ||
| codecheck_codestyle | ✅ SUCCESS | >>>>> | |
| UT_Test_3 | ✅ SUCCESS | ||
| UT_Test_2 | ✅ SUCCESS | ||
| UT_Test_1 | ✅ SUCCESS | ||
| UT_Test | ✅ SUCCESS | ||
| API_Check | ✅ SUCCESS | >>>>> | |
| UT_Test_report | ✅ SUCCESS | >>>>> |
[2026-04-13 17:08:04] CI执行结束


4月13日 添加了label:approved
XuebinYang
4月13日 评论:
4月13日 评论:
/lgtm


4月13日 添加了label:lgtm
4月13日 添加了label:api-check-pass
4月13日 删除了label:ci-pipeline-running
4月13日 添加了label:ci-pipeline-passed
CANN-robot
4月13日 评论:
4月13日 评论:
Review Guide
This pull-request passes review.
Committers who wrote a comment of /approve are: sjtulxh.
Reviewers who wrote a comment of /lgtm are: sjtulxh, XuebinYang.


4月13日 合入了pull request
描述
对
.devcontainer进行了整体优化,主要包含三个方面:1.
devcontainer.json— 最小权限重构旧配置使用
--privileged+ASCEND_VISIBLE_DEVICES=all暴露 NPU 设备,权限过宽。新配置改为显式列出所需设备节点,去除不必要的宿主机命名空间共享:--runtime=runc、--privileged、--net=host、--pid=host、--ipc=host、--cap-add=SYS_PTRACEASCEND_VISIBLE_DEVICES环境变量、add-ons挂载、/var/log/npu、/usr/slog挂载/dev/davinci0–/dev/davinci7及三个控制设备节点2.
README.md— 面向两类用户重组文档结构参考 larksuite/cli 风格,将 Quick Start 按使用者类型拆分:
docker run命令;要求 Agent 启动前与用户确认挂载参数并展示命令3.
Dockerfile— 自动 source 驱动环境变量在
.zshrc中追加条件判断:若/usr/local/Ascend/driver/bin/setenv.bash存在则自动 source,无驱动挂载时静默跳过。关联的Issue
无
测试
devcontainer.json在 VS Code Dev Containers 中可正常启动docker run命令在有/无 NPU 环境下均可执行文档更新
更新了
.devcontainer/README.md,重组了文档结构,区分 Human Users 和 AI Agent 两种使用场景。类型标签