dsh-scnet 0.6.3 → 0.6.5
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/README.md +7 -2
- package/README_CN.md +7 -2
- package/package.json +1 -1
- package/skills/scnet-hpc/SKILL.md +4 -3
- package/skills/scnet-hpc/VERSION +1 -1
- package/skills/scnet-hpc/clusters/_template.conf +1 -1
- package/skills/scnet-hpc/references/adding-cluster.md +1 -1
- package/skills/scnet-hpc/references/backends.md +3 -3
- package/skills/scnet-hpc/references/quickstart-en.md +2 -1
- package/skills/scnet-hpc/scripts/scnet.py +6 -6
- package/skills/scnet-hpc/scripts/scnet_backends/profile.py +1 -1
- package/skills/scnet-hpc/scripts/setup.sh +4 -4
package/README.md
CHANGED
|
@@ -4,7 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
DSH-SCNet (`dsh-scnet` on npm) is a community-maintained DSH bundle for operating Supercomputing Network (SCNet). It packages the source [`scnet-hpc`](https://github.com/lql341/scnet-hpc) Skill, profile-aware utilities, and bounded tools for SSH, Slurm, OpenAPI files, regional resources, and Notebook discovery.
|
|
6
6
|
|
|
7
|
-
Current release: **0.6.
|
|
7
|
+
Current release: **0.6.5**
|
|
8
|
+
|
|
9
|
+
## What's new in 0.6.4
|
|
10
|
+
|
|
11
|
+
- OpenAPI with AK/SK is preferred for structured cluster operations; SSH remains available for environment setup, compilation, and interactive diagnosis.
|
|
12
|
+
- Ubuntu/Debian users can install `libsecret-tools` for secure local credential storage; it is optional when credentials are provided through environment variables.
|
|
8
13
|
|
|
9
14
|
> 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
15
|
|
|
@@ -130,7 +135,7 @@ synchronizes the skill and version into `dsh-scnet` and `codex-scnet-hpc`. Publi
|
|
|
130
135
|
`dsh-scnet` npm package only after that downstream change is reviewed.
|
|
131
136
|
|
|
132
137
|
For a synchronized release, run the package validation on `main`, then trigger the repository's
|
|
133
|
-
`Publish DSH-SCNet` workflow with the exact
|
|
138
|
+
`Publish DSH-SCNet` workflow with the exact current version from `package.json`. The
|
|
134
139
|
workflow verifies the package/Skill version match, runs validation, creates the tarball, publishes
|
|
135
140
|
stable releases with the `latest` tag, and creates the matching Git tag. Do not bump only
|
|
136
141
|
`package.json`: `skills/scnet-hpc/VERSION`, the package version, and both README release markers
|
package/README_CN.md
CHANGED
|
@@ -4,7 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
<p align="center">在 DeepSeek Harness 里操作超算互联网(SCNet):配置 SSH、管理 Slurm 作业、查询 OpenAPI 区域和文件、检查 Notebook 资源与实例,并保留海光 DCU/DTK 诊断能力。</p>
|
|
6
6
|
|
|
7
|
-
当前版本:**0.6.
|
|
7
|
+
当前版本:**0.6.5**
|
|
8
|
+
|
|
9
|
+
## 0.6.4 更新
|
|
10
|
+
|
|
11
|
+
- 结构化集群操作优先使用 OpenAPI AK/SK;环境配置、编译和交互式诊断仍可使用 SSH。
|
|
12
|
+
- Ubuntu/Debian 可安装 `libsecret-tools` 安全保存本地凭据;通过环境变量提供 AK/SK 时无需安装。
|
|
8
13
|
|
|
9
14
|
> 本项目是独立维护的社区项目,与 DeepSeek Harness 兼容,但不是 DeepSeek 官方产品,也不表示 DeepSeek 对本项目提供背书、合作或授权。
|
|
10
15
|
|
|
@@ -141,7 +146,7 @@ git 源、本地目录安装以及验证步骤见[安装说明](./docs/installat
|
|
|
141
146
|
才能发布对应版本的 `dsh-scnet` npm 包。
|
|
142
147
|
|
|
143
148
|
下游同步合并到 `main` 后,先运行本地校验,再手动触发仓库的 `Publish DSH-SCNet` workflow,
|
|
144
|
-
输入 `package.json`
|
|
149
|
+
输入 `package.json` 中的当前版本。workflow 会校验 package 与 Skill
|
|
145
150
|
版本一致,执行验证、生成 tarball、以稳定版 `latest` 标签发布,并创建对应 Git tag。
|
|
146
151
|
不要只修改 `package.json`;`skills/scnet-hpc/VERSION`、package 版本和两份 README 的版本
|
|
147
152
|
标记必须保持一致。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-scnet",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.5",
|
|
4
4
|
"description": "Community DeepSeek Harness bundle for SCNet SSH and OpenAPI jobs, files, Notebook resources, Slurm diagnostics, and Hygon DCU/DTK guidance.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.mjs",
|
|
@@ -5,8 +5,9 @@ description: Configure or operate SCNet HPC through SSH, OpenAPI, and pluggable
|
|
|
5
5
|
|
|
6
6
|
# SCNet HPC
|
|
7
7
|
|
|
8
|
-
Use the
|
|
9
|
-
|
|
8
|
+
Use OpenAPI AK/SK as the preferred backend for structured cluster operations. Keep SSH as the
|
|
9
|
+
secondary backend for environment setup, compilation, interactive diagnosis, and operations not
|
|
10
|
+
available through the API. Never silently switch backends.
|
|
10
11
|
|
|
11
12
|
## First use and selection
|
|
12
13
|
|
|
@@ -14,7 +15,7 @@ OpenAPI is the structured control plane. Never silently switch backends.
|
|
|
14
15
|
- Advanced OpenAPI discovery: `python3 scripts/scnet.py setup`.
|
|
15
16
|
- Read-only preflight: `python3 scripts/scnet.py doctor`.
|
|
16
17
|
- Backend precedence: `--backend`, `SCNET_HPC_BACKEND`, saved setup choice, profile
|
|
17
|
-
`DEFAULT_BACKEND`, then `
|
|
18
|
+
`DEFAULT_BACKEND`, then `openapi`.
|
|
18
19
|
- Read `clusters/<cluster>.conf` before reporting static facts. Treat
|
|
19
20
|
`clusters/.cache/<cluster>.auto.conf` as optional, time-sensitive SSH probe data.
|
|
20
21
|
- With multiple profiles, require an explicit cluster before access changes, installation,
|
package/skills/scnet-hpc/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.6.
|
|
1
|
+
0.6.5
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
# ---- 通用与 SSH 连接 ----
|
|
13
13
|
CLUSTER_ID="" # 短名,同时用作 ssh 别名,如 "zzeshell"
|
|
14
14
|
CLUSTER_DESC="" # 人类可读描述,如 "海光 DCU(郑州)"
|
|
15
|
-
DEFAULT_BACKEND="
|
|
15
|
+
DEFAULT_BACKEND="openapi" # openapi(推荐)/ ssh / 已注册的外部 backend
|
|
16
16
|
SSH_HOST="" # 如 "xxx.scnet.cn"
|
|
17
17
|
SSH_PORT="22"
|
|
18
18
|
HOME_BASE="/public/home" # 家目录父路径
|
|
@@ -142,7 +142,7 @@ Triton 是多种推理框架的运行前提;不可用时,对应的 Triton
|
|
|
142
142
|
|
|
143
143
|
| 字段 | 谁用 | 留空的后果 |
|
|
144
144
|
|---|---|---|
|
|
145
|
-
| `DEFAULT_BACKEND` | `scnet.py` | 默认使用 `
|
|
145
|
+
| `DEFAULT_BACKEND` | `scnet.py` | 默认使用 `openapi` |
|
|
146
146
|
| `OPENAPI_REGION_ID` | OpenAPI backend | 多区域账户需要每次显式传 `--region` |
|
|
147
147
|
| `OPENAPI_SCHEDULER_ID` | OpenAPI backend | 多调度器区域需要每次显式传 `--scheduler-id` |
|
|
148
148
|
| `MIN_GRES` | 文档提示 | 不提示 QOS 强制申请加速器 |
|
|
@@ -12,7 +12,7 @@ Backend precedence:
|
|
|
12
12
|
2. `SCNET_HPC_BACKEND`;
|
|
13
13
|
3. saved setup-panel `default_backend`;
|
|
14
14
|
4. selected profile `DEFAULT_BACKEND`;
|
|
15
|
-
5. `
|
|
15
|
+
5. `openapi`.
|
|
16
16
|
|
|
17
17
|
Do not silently fall back between backends. A failed OpenAPI request must not become an SSH
|
|
18
18
|
submission, and a failed SSH command must not be replayed through OpenAPI. Replaying mutations
|
|
@@ -39,7 +39,7 @@ Built-in capability summary:
|
|
|
39
39
|
| Modules, builds, interactive diagnosis | yes | no |
|
|
40
40
|
| Notebook read-only discovery | no | yes |
|
|
41
41
|
|
|
42
|
-
Use OpenAPI
|
|
42
|
+
Use OpenAPI as the preferred structured control-plane backend. Use SSH for environment setup, compilation,
|
|
43
43
|
interactive inspection, full scheduler tooling, and operations not represented by a structured
|
|
44
44
|
backend.
|
|
45
45
|
|
|
@@ -168,7 +168,7 @@ until the official interface is available and verified.
|
|
|
168
168
|
Profiles may contain non-secret backend hints:
|
|
169
169
|
|
|
170
170
|
```bash
|
|
171
|
-
DEFAULT_BACKEND="
|
|
171
|
+
DEFAULT_BACKEND="openapi"
|
|
172
172
|
OPENAPI_REGION_ID=""
|
|
173
173
|
OPENAPI_SCHEDULER_ID=""
|
|
174
174
|
OPENAPI_USERNAME=""
|
|
@@ -32,7 +32,8 @@ List available access backends:
|
|
|
32
32
|
python3 scripts/scnet.py backends
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
OpenAPI with AK/SK is the preferred default for structured queue, limit, job, log, and file
|
|
36
|
+
operations. Use SSH for environment setup and interactive shell work:
|
|
36
37
|
|
|
37
38
|
```bash
|
|
38
39
|
python3 scripts/scnet.py --backend openapi clusters
|
|
@@ -60,7 +60,7 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
60
60
|
"--backend",
|
|
61
61
|
help=(
|
|
62
62
|
"backend name; defaults to SCNET_HPC_BACKEND, saved setup choice, "
|
|
63
|
-
"profile DEFAULT_BACKEND, then
|
|
63
|
+
"profile DEFAULT_BACKEND, then openapi"
|
|
64
64
|
),
|
|
65
65
|
)
|
|
66
66
|
parser.add_argument("--cluster", help="local cluster profile name")
|
|
@@ -220,7 +220,7 @@ def choose_backend(
|
|
|
220
220
|
or os.environ.get("SCNET_HPC_BACKEND")
|
|
221
221
|
or str(user_config.get("default_backend") or "")
|
|
222
222
|
or profile.get("DEFAULT_BACKEND")
|
|
223
|
-
or "
|
|
223
|
+
or "openapi"
|
|
224
224
|
)
|
|
225
225
|
|
|
226
226
|
|
|
@@ -943,14 +943,14 @@ def setup_panel(
|
|
|
943
943
|
print("自动探测区域、调度器和 SSH 元数据;只要求输入必要凭据。\n")
|
|
944
944
|
_print_terminal_help()
|
|
945
945
|
|
|
946
|
-
current_default = str(current.get("default_backend") or "
|
|
946
|
+
current_default = str(current.get("default_backend") or "openapi")
|
|
947
947
|
if mode == "all":
|
|
948
948
|
backend = _choose(
|
|
949
949
|
"选择默认 backend:",
|
|
950
|
-
["
|
|
951
|
-
1 if current_default == "
|
|
950
|
+
["OpenAPI(推荐,结构化控制面)", "SSH(环境配置和深度诊断)"],
|
|
951
|
+
1 if current_default == "openapi" else 2,
|
|
952
952
|
)
|
|
953
|
-
default_backend = "
|
|
953
|
+
default_backend = "openapi" if backend.startswith("OpenAPI") else "ssh"
|
|
954
954
|
configure_ssh = _ask_yes_no(
|
|
955
955
|
"是否添加或更新一个 SSH 区域?", default=default_backend == "ssh"
|
|
956
956
|
)
|
|
@@ -58,7 +58,7 @@ def list_profiles(repo_root: Path) -> list[dict[str, str]]:
|
|
|
58
58
|
"name": path.stem,
|
|
59
59
|
"cluster_id": profile.get("CLUSTER_ID", path.stem),
|
|
60
60
|
"description": profile.get("CLUSTER_DESC", ""),
|
|
61
|
-
"default_backend": profile.get("DEFAULT_BACKEND", "
|
|
61
|
+
"default_backend": profile.get("DEFAULT_BACKEND", "openapi"),
|
|
62
62
|
}
|
|
63
63
|
)
|
|
64
64
|
return result
|
|
@@ -345,7 +345,7 @@ case "$(uname -s)" in
|
|
|
345
345
|
&& grep -Eq '^ID=(ubuntu|debian)$' /etc/os-release; then
|
|
346
346
|
printf '%s\n' \
|
|
347
347
|
"Ubuntu/Debian:在 Terminal 中使用 ↑/↓ 和 Enter,也可输入编号;Ctrl+C 可取消。" \
|
|
348
|
-
"
|
|
348
|
+
"本机安全保存 AK/SK 可安装 libsecret-tools(sudo apt install libsecret-tools);使用环境变量时无需安装。" >&2
|
|
349
349
|
else
|
|
350
350
|
printf '%s\n' "Linux:使用 ↑/↓ 和 Enter,也可输入编号;Ctrl+C 可取消。" >&2
|
|
351
351
|
fi
|
|
@@ -382,12 +382,12 @@ fi
|
|
|
382
382
|
|
|
383
383
|
if [ -z "$BACKEND" ]; then
|
|
384
384
|
BACKEND=$(choose "选择要管理的 backend:" \
|
|
385
|
+
"openapi(推荐:平台级 AK/SK 和多区域)" \
|
|
385
386
|
"ssh(区域级用户名和私钥)" \
|
|
386
|
-
"openapi(平台级 AK/SK 和多区域)" \
|
|
387
387
|
"both(同时管理)")
|
|
388
388
|
case "$BACKEND" in
|
|
389
|
-
ssh*) BACKEND=ssh ;;
|
|
390
389
|
openapi*) BACKEND=openapi ;;
|
|
390
|
+
ssh*) BACKEND=ssh ;;
|
|
391
391
|
both*) BACKEND=both ;;
|
|
392
392
|
esac
|
|
393
393
|
fi
|
|
@@ -429,7 +429,7 @@ fi
|
|
|
429
429
|
|
|
430
430
|
DEFAULT_BACKEND="$BACKEND"
|
|
431
431
|
if [ "$BACKEND" = both ]; then
|
|
432
|
-
DEFAULT_BACKEND=$(choose "选择默认 backend:" "
|
|
432
|
+
DEFAULT_BACKEND=$(choose "选择默认 backend:" "openapi" "ssh")
|
|
433
433
|
fi
|
|
434
434
|
|
|
435
435
|
if [ "$BACKEND" = ssh ] || [ "$BACKEND" = both ]; then
|