dsh-scnet 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +125 -9
- package/README_CN.md +107 -0
- package/cordis.patch.yml +8 -0
- package/docs/installation.md +60 -0
- package/docs/installation.zh-CN.md +73 -0
- package/docs/testing.md +63 -0
- package/docs/testing.zh-CN.md +62 -0
- package/package.json +13 -8
- package/skills/scnet-hpc/SKILL.md +88 -246
- package/skills/scnet-hpc/clusters/zzeshell.conf +1 -1
- package/skills/scnet-hpc/references/adding-cluster.md +13 -16
- package/skills/scnet-hpc/references/environment.md +15 -15
- package/skills/scnet-hpc/references/quickstart-en.md +4 -0
- package/skills/scnet-hpc/references/setup.md +9 -11
- package/skills/scnet-hpc/references/software-compatibility.md +6 -6
- package/skills/scnet-hpc/references/troubleshooting.md +15 -16
- package/skills/scnet-hpc/scripts/new-job.sh +5 -5
- package/skills/scnet-hpc/scripts/refresh-cluster.sh +1 -1
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,7 +1,119 @@
|
|
|
1
|
-
|
|
1
|
+
# DSH-SCNet
|
|
2
|
+
|
|
3
|
+
[English](#english) | [简体中文](#简体中文)
|
|
4
|
+
|
|
5
|
+
## English
|
|
6
|
+
|
|
7
|
+
DSH-SCNet (`dsh-scnet` on npm) is a community-maintained DSH bundle for operating Supercomputing Network (SCNet) clusters. It packages the canonical [`scnet-hpc`](https://github.com/lql341/scnet-hpc) skill, profile-aware shell utilities, and seven deterministic tools for SSH setup, Slurm job generation, cluster discovery, and compute-node diagnostics.
|
|
8
|
+
|
|
9
|
+
> This is an independent community project. It is compatible with DeepSeek Harness but is not an official DeepSeek product and does not imply endorsement, partnership, or authorization by DeepSeek.
|
|
10
|
+
|
|
11
|
+
## Requirements
|
|
12
|
+
|
|
13
|
+
- Node.js 22.19 or later
|
|
14
|
+
- DeepSeek Harness (`dsh`)
|
|
15
|
+
- Linux or macOS for native shell execution
|
|
16
|
+
- Windows through WSL2; native Windows execution is not supported by the bundled Bash scripts
|
|
17
|
+
- An SCNet account and cluster credentials for remote operations
|
|
18
|
+
|
|
19
|
+
## Install
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
dsh plugin --profile web add dsh-scnet
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Then verify that the bundle layer is present:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
dsh --profile web --dump-config
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
See [Installation](./docs/installation.md) for npm, GitHub, and local-checkout workflows.
|
|
32
|
+
|
|
33
|
+
## Included capabilities
|
|
34
|
+
|
|
35
|
+
| Component | Purpose |
|
|
36
|
+
| --- | --- |
|
|
37
|
+
| `scnet-hpc` skill | Profile-based operating guidance for SSH, Slurm, offline compute nodes, and accelerator validation |
|
|
38
|
+
| `scnet_list_clusters` | List packaged cluster profiles |
|
|
39
|
+
| `scnet_show_cluster` | Read a selected profile before reporting resource constraints |
|
|
40
|
+
| `scnet_generate_job` | Generate profile-aware accelerator or CPU-only Slurm scripts |
|
|
41
|
+
| `scnet_setup_ssh` | Configure a local SSH key and host entry with explicit user confirmation |
|
|
42
|
+
| `scnet_probe_cluster` | Produce an initial profile from read-only login-node probes |
|
|
43
|
+
| `scnet_refresh_cluster` | Refresh time-sensitive profile fields; compute probing is opt-in |
|
|
44
|
+
| `scnet_run_compute_probe` | Submit a minimal compute-node capability probe |
|
|
45
|
+
|
|
46
|
+
Packaged profiles currently cover Zhengzhou, Kunshan, Wuzhen, and Xi'an SCNet environments. Cluster specifications and scheduler policies remain profile-specific and should be verified against the target environment.
|
|
47
|
+
|
|
48
|
+
## Bundle structure
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
.
|
|
52
|
+
├── package.json
|
|
53
|
+
├── cordis.patch.yml
|
|
54
|
+
├── index.mjs
|
|
55
|
+
├── skills/scnet-hpc/
|
|
56
|
+
│ ├── SKILL.md
|
|
57
|
+
│ ├── clusters/
|
|
58
|
+
│ ├── references/
|
|
59
|
+
│ └── scripts/
|
|
60
|
+
├── scripts/validate-package.mjs
|
|
61
|
+
├── docs/
|
|
62
|
+
├── sync.sh
|
|
63
|
+
└── .github/workflows/
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The package is a DSH bundle: `package.json` declares `dsh.bundle.patch`, and `cordis.patch.yml` mounts both the tool plugin and the packaged skill directory through `@deepseek-ai/dsh-skill-filesystem`.
|
|
67
|
+
|
|
68
|
+
## Source synchronization
|
|
69
|
+
|
|
70
|
+
The `skills/scnet-hpc/` directory is generated from the canonical `scnet-hpc` repository:
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
./sync.sh --src ../scnet-hpc
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Do not maintain the generated directory independently. The sync excludes the canonical installer and local probe cache because neither belongs in the npm runtime package.
|
|
77
|
+
|
|
78
|
+
## Validation
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
npm install --no-package-lock --ignore-scripts
|
|
82
|
+
npm run validate
|
|
83
|
+
npm pack --dry-run
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
See [Testing](./docs/testing.md) for local package installation and risk-ordered runtime checks.
|
|
87
|
+
|
|
88
|
+
## Security boundaries
|
|
89
|
+
|
|
90
|
+
- The repository and npm package must not contain private keys, tokens, usernames, private endpoints, or local probe caches.
|
|
91
|
+
- SSH configuration, remote probes, and Slurm submission are state-changing operations and require an explicit target and user authorization.
|
|
92
|
+
- Generated Slurm files may include local usernames and are ignored by Git.
|
|
93
|
+
- Accelerator compatibility claims require evidence from the target compute node.
|
|
94
|
+
|
|
95
|
+
## Branding
|
|
96
|
+
|
|
97
|
+
The project uses the abbreviated `DSH` ecosystem identifier in its name. References to “DeepSeek Harness” are descriptive compatibility statements only. No official logo or other DeepSeek brand asset is distributed by this package.
|
|
98
|
+
|
|
99
|
+
The naming and attribution policy follows the [DeepSeek Harness brand guidelines](https://github.com/deepseek-ai/deepseek-harness/blob/dsh-v0.1.0-rc.8/BRAND_GUIDELINES.md).
|
|
100
|
+
|
|
101
|
+
## License
|
|
102
|
+
|
|
103
|
+
This project is released under the [MIT License](LICENSE). Subject to the license terms, the software may be used, copied, modified, merged, published, sublicensed, and distributed, including for commercial purposes.
|
|
104
|
+
|
|
105
|
+
Redistributions must retain the copyright notice and the MIT license notice. The software is provided “as is,” without warranties of any kind; users are responsible for evaluating the suitability and risks of the bundle, skill instructions, cluster profiles, scripts, and generated outputs for their own environment.
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## 简体中文
|
|
110
|
+
|
|
111
|
+
[English](#english) | [简体中文](#简体中文)
|
|
2
112
|
|
|
3
113
|
<p align="center">在 DeepSeek Harness 里操作超算互联网(SCNet)集群:配 SSH、生成 CPU/DCU Slurm 作业、探测/刷新集群、运行计算节点探针、排查失败,附海光 DCU/DTK 知识和英文快速指南。</p>
|
|
4
114
|
|
|
115
|
+
> 本项目是独立维护的社区项目,与 DeepSeek Harness 兼容,但不是 DeepSeek 官方产品,也不表示 DeepSeek 对本项目提供背书、合作或授权。
|
|
116
|
+
|
|
5
117
|
## 这是什么
|
|
6
118
|
|
|
7
119
|
一个 DeepSeek Harness bundle 插件,把 `scnet-hpc` 的 Agent Skill 和 bash 脚本包装成 DSH 可安装包。装好后 DSH 模型在涉及超算集群、Slurm 作业、海光 DCU/DTK 时会加载对应 skill,并可调用工具完成确定性操作。
|
|
@@ -14,7 +126,7 @@
|
|
|
14
126
|
dsh plugin --profile web add dsh-scnet
|
|
15
127
|
```
|
|
16
128
|
|
|
17
|
-
git 源、本地目录安装以及验证步骤见
|
|
129
|
+
git 源、本地目录安装以及验证步骤见[安装说明](./docs/installation.zh-CN.md)。
|
|
18
130
|
|
|
19
131
|
## 能力面
|
|
20
132
|
|
|
@@ -47,14 +159,14 @@ git 源、本地目录安装以及验证步骤见 [INSTALL.md](./INSTALL.md)。
|
|
|
47
159
|
|
|
48
160
|
## 文档
|
|
49
161
|
|
|
50
|
-
- [
|
|
51
|
-
- [
|
|
162
|
+
- [安装说明](./docs/installation.zh-CN.md)
|
|
163
|
+
- [测试说明](./docs/testing.zh-CN.md)
|
|
52
164
|
|
|
53
165
|
## 结构
|
|
54
166
|
|
|
55
167
|
```
|
|
56
168
|
.
|
|
57
|
-
├── package.json # dsh.bundle
|
|
169
|
+
├── package.json # dsh.bundle manifest
|
|
58
170
|
├── cordis.patch.yml # bundle 组合层
|
|
59
171
|
├── index.mjs # Cordis 入口,注册 7 个工具
|
|
60
172
|
├── skills/scnet-hpc/
|
|
@@ -66,9 +178,9 @@ git 源、本地目录安装以及验证步骤见 [INSTALL.md](./INSTALL.md)。
|
|
|
66
178
|
│ ├── scripts/
|
|
67
179
|
│ └── references/
|
|
68
180
|
├── sync.sh # 从 canonical 仓库同步
|
|
69
|
-
├── README.md #
|
|
70
|
-
├──
|
|
71
|
-
├──
|
|
181
|
+
├── README.md # 英文默认说明
|
|
182
|
+
├── README_CN.md # 中文说明
|
|
183
|
+
├── docs/ # 中英文安装与测试文档
|
|
72
184
|
├── LICENSE
|
|
73
185
|
└── .gitignore
|
|
74
186
|
```
|
|
@@ -96,4 +208,8 @@ git 源、本地目录安装以及验证步骤见 [INSTALL.md](./INSTALL.md)。
|
|
|
96
208
|
|
|
97
209
|
## License
|
|
98
210
|
|
|
99
|
-
MIT
|
|
211
|
+
本项目采用 [MIT License](LICENSE) 开源。除许可证正文另有规定外,使用者可以自由使用、复制、修改、合并、发布、再许可和销售本项目及其衍生作品。
|
|
212
|
+
|
|
213
|
+
再发布本项目或其重要组成部分时,应保留版权声明和 MIT 许可声明。本项目按“现状”提供,不对适销性、特定用途适用性或不侵权作任何明示或默示保证;使用者应自行评估 DSH bundle、skill 说明、集群配置、脚本和生成结果在其环境中的适用性与风险。
|
|
214
|
+
|
|
215
|
+
项目命名与归属声明遵循 [DeepSeek Harness 品牌素材使用规范](https://github.com/deepseek-ai/deepseek-harness/blob/dsh-v0.1.0-rc.8/BRAND_GUIDELINES.zh.md)。
|
package/README_CN.md
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
<h1 align="center">DSH-SCNet</h1>
|
|
2
|
+
|
|
3
|
+
[English](./README.md) | 简体中文
|
|
4
|
+
|
|
5
|
+
<p align="center">在 DeepSeek Harness 里操作超算互联网(SCNet)集群:配 SSH、生成 CPU/DCU Slurm 作业、探测/刷新集群、运行计算节点探针、排查失败,附海光 DCU/DTK 知识和英文快速指南。</p>
|
|
6
|
+
|
|
7
|
+
> 本项目是独立维护的社区项目,与 DeepSeek Harness 兼容,但不是 DeepSeek 官方产品,也不表示 DeepSeek 对本项目提供背书、合作或授权。
|
|
8
|
+
|
|
9
|
+
## 这是什么
|
|
10
|
+
|
|
11
|
+
一个 DeepSeek Harness bundle 插件,把 `scnet-hpc` 的 Agent Skill 和 bash 脚本包装成 DSH 可安装包。装好后 DSH 模型在涉及超算集群、Slurm 作业、海光 DCU/DTK 时会加载对应 skill,并可调用工具完成确定性操作。
|
|
12
|
+
|
|
13
|
+
## 安装
|
|
14
|
+
|
|
15
|
+
推荐从 npm 安装:
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
dsh plugin --profile web add dsh-scnet
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
git 源、本地目录安装以及验证步骤见[安装说明](./docs/installation.zh-CN.md)。
|
|
22
|
+
|
|
23
|
+
## 能力面
|
|
24
|
+
|
|
25
|
+
### Skills
|
|
26
|
+
|
|
27
|
+
| Skill | 作用 |
|
|
28
|
+
|---|---|
|
|
29
|
+
| scnet-hpc | 国产超算使用规范:连接、提交/监控、调试、失败排查、海光 DCU/DTK 资源索引 |
|
|
30
|
+
|
|
31
|
+
### 内置集群
|
|
32
|
+
|
|
33
|
+
| 短名 | 描述 | 加速器 |
|
|
34
|
+
|---|---|---|
|
|
35
|
+
| zzeshell | 超算互联网 · 郑州 | 海光 BW1000 DCU (gfx936) ×8, 64GB/卡 |
|
|
36
|
+
| kseshell | 超算互联网 · 昆山 | 海光 Z100 DCU (gfx906) ×4, 16GB/卡 |
|
|
37
|
+
| wuzhshell | 超算互联网 · 乌镇 | 海光 Z100 DCU (gfx906) ×4, 16GB/卡 |
|
|
38
|
+
| xianshell | 超算互联网 · 西安 | 海光 Z100 DCU (gfx906) ×4, 16GB/卡 |
|
|
39
|
+
|
|
40
|
+
### Tools
|
|
41
|
+
|
|
42
|
+
| 工具 | 说明 |
|
|
43
|
+
|---|---|
|
|
44
|
+
| scnet_list_clusters | 列出已配置的集群 profile |
|
|
45
|
+
| scnet_show_cluster | 读取指定集群的完整参数 |
|
|
46
|
+
| scnet_generate_job | 按 profile 生成加速器或 CPU-only Slurm 作业,支持显式分区覆盖 |
|
|
47
|
+
| scnet_setup_ssh | 配置本地到集群的 SSH 连接 |
|
|
48
|
+
| scnet_probe_cluster | 探测新集群并生成 profile |
|
|
49
|
+
| scnet_refresh_cluster | 动态刷新已有集群的规则缓存 |
|
|
50
|
+
| scnet_run_compute_probe | 在计算节点运行最小能力探针 |
|
|
51
|
+
|
|
52
|
+
## 文档
|
|
53
|
+
|
|
54
|
+
- [安装说明](./docs/installation.zh-CN.md)
|
|
55
|
+
- [测试说明](./docs/testing.zh-CN.md)
|
|
56
|
+
|
|
57
|
+
## 结构
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
.
|
|
61
|
+
├── package.json # dsh.bundle manifest
|
|
62
|
+
├── cordis.patch.yml # bundle 组合层
|
|
63
|
+
├── index.mjs # Cordis 入口,注册 7 个工具
|
|
64
|
+
├── skills/scnet-hpc/
|
|
65
|
+
│ ├── clusters/
|
|
66
|
+
│ │ ├── zzeshell.conf
|
|
67
|
+
│ │ ├── kseshell.conf
|
|
68
|
+
│ │ ├── wuzhshell.conf
|
|
69
|
+
│ │ └── xianshell.conf
|
|
70
|
+
│ ├── scripts/
|
|
71
|
+
│ └── references/
|
|
72
|
+
├── sync.sh # 从 canonical 仓库同步
|
|
73
|
+
├── README.md # 英文默认说明
|
|
74
|
+
├── README_CN.md # 中文说明
|
|
75
|
+
├── docs/ # 中英文安装与测试文档
|
|
76
|
+
├── LICENSE
|
|
77
|
+
└── .gitignore
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## 同步
|
|
81
|
+
|
|
82
|
+
本仓库是发布面,知识内容(`skills/scnet-hpc/` 下的 SKILL.md、clusters、references、scripts)从 canonical 仓库 `lql341/scnet-hpc` 同步:
|
|
83
|
+
|
|
84
|
+
```sh
|
|
85
|
+
./sync.sh # 当前本机布局默认 ../../skills/scnet-hpc
|
|
86
|
+
./sync.sh --src /path/to/scnet-hpc
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
只改 canonical,本仓库跑 sync 更新;不要把 `skills/scnet-hpc/` 当手工维护目录。
|
|
90
|
+
`sync.sh` 会自动排除 `scripts/install.sh` 和 `clusters/.cache/`,避免把安装脚本或本机动态缓存打进发布包。
|
|
91
|
+
|
|
92
|
+
## 隐私与安全
|
|
93
|
+
|
|
94
|
+
- 仓库不含私钥、token、用户名、密钥指纹。
|
|
95
|
+
- `scnet_setup_ssh` 会写入 `~/.ssh/`,调用前确认私钥路径和集群。
|
|
96
|
+
- `scnet_generate_job` 生成的 `.slurm` 可能含本机用户名,`.gitignore` 已排除。
|
|
97
|
+
- SSH 接入端点仅使用平台面向用户公开提供的信息,由 canonical 仓库维护。
|
|
98
|
+
- `scnet_refresh_cluster` / `scnet_run_compute_probe` 会 SSH 到远端并可能提交作业;运行前确认集群和副作用。
|
|
99
|
+
- `clusters/.cache/` 是本机动态探测缓存,`.gitignore` 已排除,不应提交。
|
|
100
|
+
|
|
101
|
+
## License
|
|
102
|
+
|
|
103
|
+
本项目采用 [MIT License](LICENSE) 开源。除许可证正文另有规定外,使用者可以自由使用、复制、修改、合并、发布、再许可和销售本项目及其衍生作品。
|
|
104
|
+
|
|
105
|
+
再发布本项目或其重要组成部分时,应保留版权声明和 MIT 许可声明。本项目按“现状”提供,不对适销性、特定用途适用性或不侵权作任何明示或默示保证;使用者应自行评估 DSH bundle、skill 说明、集群配置、脚本和生成结果在其环境中的适用性与风险。
|
|
106
|
+
|
|
107
|
+
项目命名与归属声明遵循 [DeepSeek Harness 品牌素材使用规范](https://github.com/deepseek-ai/deepseek-harness/blob/dsh-v0.1.0-rc.8/BRAND_GUIDELINES.zh.md)。
|
package/cordis.patch.yml
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
- insert:
|
|
2
|
+
- id: scnet-skill-filesystem
|
|
3
|
+
name: '@deepseek-ai/dsh-skill-filesystem'
|
|
4
|
+
config:
|
|
5
|
+
providerName: scnet-hpc
|
|
6
|
+
includeDefaultRoots: false
|
|
7
|
+
customSkillDirs:
|
|
8
|
+
- !!js "process.getBuiltinModule('node:url').fileURLToPath(new URL('skills/', baseUrl))"
|
|
9
|
+
|
|
2
10
|
- id: scnet
|
|
3
11
|
name: dsh-scnet
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Installation
|
|
2
|
+
|
|
3
|
+
[简体中文](./installation.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
## Requirements
|
|
6
|
+
|
|
7
|
+
- Node.js 22.19 or later
|
|
8
|
+
- A supported DeepSeek Harness installation
|
|
9
|
+
- Linux or macOS; Windows users should run the plugin through WSL2
|
|
10
|
+
|
|
11
|
+
Install the DSH CLI if it is not already available:
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npm install --global @deepseek-ai/dsh
|
|
15
|
+
dsh --version
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Install from npm
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
dsh plugin --profile web add dsh-scnet
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Install from GitHub
|
|
25
|
+
|
|
26
|
+
Pin a commit for reproducible installation:
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
dsh plugin --profile web add "github:lql341/dsh-scnet#<commit>"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The entry point is plain JavaScript and requires no package build step.
|
|
33
|
+
|
|
34
|
+
## Install from a local checkout
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
git clone https://github.com/lql341/dsh-scnet.git
|
|
38
|
+
cd dsh-scnet
|
|
39
|
+
npm install --no-package-lock --ignore-scripts
|
|
40
|
+
npm run validate
|
|
41
|
+
dsh plugin --profile web add .
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Verify the bundle
|
|
45
|
+
|
|
46
|
+
Inspect the composed profile without starting the UI:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
dsh --profile web --dump-config
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The output should include the `scnet` tool row and the `scnet-skill-filesystem` row. Start the Web UI and ask the model to call `scnet_list_clusters`:
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
dsh web
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Credentials
|
|
59
|
+
|
|
60
|
+
Model credentials belong in the DSH credential store or its supported settings interface. SCNet private keys remain local and are supplied only when the user explicitly invokes SSH setup. Neither credential type belongs in this repository.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# 安装 DSH-SCNet
|
|
2
|
+
|
|
3
|
+
DSH-SCNet(npm 包名:`dsh-scnet`) 是一个 DeepSeek Harness(DSH)bundle 插件,把国产超算集群使用规范打包成 skill 和 7 个工具。
|
|
4
|
+
|
|
5
|
+
## 前置条件
|
|
6
|
+
|
|
7
|
+
- Node.js ≥ 22.19
|
|
8
|
+
- 已安装 `dsh` CLI:
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
npm install -g @deepseek-ai/dsh
|
|
12
|
+
dsh --version
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## 方式一:从 npm 安装(推荐)
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
dsh plugin --profile web add dsh-scnet
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## 方式二:从 GitHub 安装
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
dsh plugin --profile web add "github:lql341/dsh-scnet#main"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
> 本插件入口是纯 JavaScript,无编译步骤,git 源安装不需要 `allowBuilds`。
|
|
28
|
+
|
|
29
|
+
## 方式三:本地目录安装
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
git clone https://github.com/lql341/dsh-scnet.git
|
|
33
|
+
cd dsh-scnet
|
|
34
|
+
dsh plugin --profile web add .
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## 验证安装
|
|
38
|
+
|
|
39
|
+
启动 Web UI:
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
dsh web
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
浏览器打开 `http://127.0.0.1:3080`,发一条:
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
用 scnet_list_clusters 看看现在有哪些可用的超算集群。
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
如果能返回集群列表,说明插件已安装并能被模型调用。
|
|
52
|
+
|
|
53
|
+
## 配置 DeepSeek API Key
|
|
54
|
+
|
|
55
|
+
首次使用需要配置模型 Key。打开 Web UI 后:
|
|
56
|
+
|
|
57
|
+
```text
|
|
58
|
+
设置 → 模型 → 在 DeepSeek 卡片填入 API Key → 保存
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
也可以直接编辑凭据文件:
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
~/.dsh/.credentials.yaml
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
把其中的占位符替换成你的 Key:
|
|
68
|
+
|
|
69
|
+
```yaml
|
|
70
|
+
DEEPSEEK_API_KEY: sk-你的key
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
保存后无需重启,下一次请求即生效。Key 只保存在本机 `~/.dsh` 下,不会写入仓库。
|
package/docs/testing.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Testing
|
|
2
|
+
|
|
3
|
+
[简体中文](./testing.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
Run checks in increasing order of side effects.
|
|
6
|
+
|
|
7
|
+
## 1. Static package validation
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install --no-package-lock --ignore-scripts
|
|
11
|
+
npm run validate
|
|
12
|
+
npm pack --dry-run
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
This validates the package manifest, JavaScript entry point, sync script, and packaged shell scripts.
|
|
16
|
+
|
|
17
|
+
## 2. Install the packed artifact
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
mkdir -p .release
|
|
21
|
+
npm pack --pack-destination .release
|
|
22
|
+
dsh plugin --profile test-scnet add ./.release/dsh-scnet-*.tgz
|
|
23
|
+
dsh --profile test-scnet --dump-config
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Confirm that the composed configuration includes:
|
|
27
|
+
|
|
28
|
+
```text
|
|
29
|
+
- id: scnet-skill-filesystem
|
|
30
|
+
- id: scnet
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## 3. Read-only tool checks
|
|
34
|
+
|
|
35
|
+
| Tool | Expected result |
|
|
36
|
+
| --- | --- |
|
|
37
|
+
| `scnet_list_clusters` | Returns the packaged cluster identifiers |
|
|
38
|
+
| `scnet_show_cluster` | Returns the selected profile contents |
|
|
39
|
+
| `scnet_generate_job` | Writes a profile-aware Slurm script in the current directory |
|
|
40
|
+
|
|
41
|
+
Check both accelerator and CPU-only job generation. Review the output for the selected partition, memory, and GRES rules.
|
|
42
|
+
|
|
43
|
+
## 4. Local state changes
|
|
44
|
+
|
|
45
|
+
`scnet_setup_ssh` writes under `~/.ssh`. Run it only with a real SCNet key, an explicit cluster, and a confirmed username. Review the resulting host entry and connection test.
|
|
46
|
+
|
|
47
|
+
## 5. Remote read-only checks
|
|
48
|
+
|
|
49
|
+
`scnet_probe_cluster` and `scnet_refresh_cluster` require a working SSH connection. Use `dry_run=true` where supported and review the proposed profile data before persisting it.
|
|
50
|
+
|
|
51
|
+
## 6. Scheduler-consuming checks
|
|
52
|
+
|
|
53
|
+
`scnet_run_compute_probe` and refresh operations with compute probing submit Slurm jobs. Confirm the target cluster, account policy, accelerator count, CPU count, and time limit before execution.
|
|
54
|
+
|
|
55
|
+
## Cleanup
|
|
56
|
+
|
|
57
|
+
Remove the isolated test profile after verification:
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
dsh plugin --profile test-scnet remove dsh-scnet
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Delete generated `.slurm` files and `.release/` artifacts when they are no longer needed.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# 初步测试 DSH-SCNet
|
|
2
|
+
|
|
3
|
+
按风险从低到高验证插件是否正常工作。
|
|
4
|
+
|
|
5
|
+
## 1. 环境准备
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
node -v # 需要 ≥ 22.19
|
|
9
|
+
npm install -g @deepseek-ai/dsh
|
|
10
|
+
dsh --version
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## 2. 安装插件
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
dsh plugin --profile web add dsh-scnet
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 3. 启动
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
dsh web
|
|
23
|
+
# 浏览器打开 http://127.0.0.1:3080
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## 4. 确认插件已加载
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
dsh --profile web --dump-config | grep -A2 scnet
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
应能看到:
|
|
33
|
+
|
|
34
|
+
```text
|
|
35
|
+
- id: scnet
|
|
36
|
+
name: dsh-scnet
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## 5. 配置 DeepSeek API Key
|
|
40
|
+
|
|
41
|
+
Web UI 里:`设置 → 模型 → DeepSeek 卡片填 Key 并保存`。
|
|
42
|
+
|
|
43
|
+
或编辑 `~/.dsh/.credentials.yaml`:
|
|
44
|
+
|
|
45
|
+
```yaml
|
|
46
|
+
DEEPSEEK_API_KEY: sk-你的key
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## 6. 会话内测工具
|
|
50
|
+
|
|
51
|
+
| 顺序 | 测试话术 | 预期 | 风险 |
|
|
52
|
+
|---|---|---|---|
|
|
53
|
+
| 1 | 用 scnet_list_clusters 看看有哪些集群 | 返回 `kseshell`、`wuzhshell`、`xianshell`、`zzeshell` | 只读 |
|
|
54
|
+
| 2 | 用 scnet_show_cluster 读一下 zzeshell | 返回该集群 profile | 只读 |
|
|
55
|
+
| 3 | 用 scnet_generate_job 生成一个 probe 作业 | 生成带 GRES 的 `.slurm` 并给出上传命令 | 只写当前目录 |
|
|
56
|
+
| 3a | 用 scnet_generate_job 在 kseshell 生成 cpu_only 构建作业 | 使用 `kshcnormal` 且不含 `--gres` | 只写当前目录 |
|
|
57
|
+
| 4 | 用 scnet_setup_ssh 配置连接 | 需要真实私钥,会改 `~/.ssh` | 中 |
|
|
58
|
+
| 5 | 用 scnet_probe_cluster 探测集群 | 需要真实集群,会 SSH 到远端 | 中 |
|
|
59
|
+
| 6 | 用 scnet_refresh_cluster dry_run=true 刷新规则 | 输出即将写入的缓存,不落盘 | 中(会 SSH) |
|
|
60
|
+
| 7 | 用 scnet_run_compute_probe 跑计算节点探针 | 返回 PROBE_ 结果 | 高(提交作业并等待) |
|
|
61
|
+
|
|
62
|
+
第 4 至 7 步只有在你有私钥和目标集群时才测,测前确认副作用。
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-scnet",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "DeepSeek Harness
|
|
3
|
+
"version": "0.4.1",
|
|
4
|
+
"description": "Community DeepSeek Harness bundle for SCNet HPC: profile-based SSH, CPU/DCU Slurm jobs, cluster probing, compute-node diagnostics, and Hygon DCU/DTK guidance.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.mjs",
|
|
7
7
|
"exports": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"./package.json": "./package.json"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@deepseek-ai/dsh-tools": "^0.1.0-rc.
|
|
13
|
+
"@deepseek-ai/dsh-tools": "^0.1.0-rc.8"
|
|
14
14
|
},
|
|
15
15
|
"repository": {
|
|
16
16
|
"type": "git",
|
|
@@ -19,15 +19,20 @@
|
|
|
19
19
|
"files": [
|
|
20
20
|
"index.mjs",
|
|
21
21
|
"cordis.patch.yml",
|
|
22
|
-
"skills"
|
|
22
|
+
"skills",
|
|
23
|
+
"docs",
|
|
24
|
+
"README_CN.md",
|
|
25
|
+
"README.md",
|
|
26
|
+
"LICENSE"
|
|
23
27
|
],
|
|
24
28
|
"dsh": {
|
|
25
29
|
"bundle": {
|
|
26
30
|
"patch": "./cordis.patch.yml"
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"test": "node --test",
|
|
35
|
+
"validate": "node scripts/validate-package.mjs"
|
|
31
36
|
},
|
|
32
37
|
"engines": {
|
|
33
38
|
"node": ">=22.19"
|