dsh-scnet 0.6.3 → 0.6.4
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 +1 -1
- package/README_CN.md +1 -1
- 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,7 @@
|
|
|
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.4**
|
|
8
8
|
|
|
9
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
10
|
|
package/README_CN.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-scnet",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.4",
|
|
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.4
|
|
@@ -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
|