slurm-assistant

分类: 工具与效率 | 上传者: QiandingHuang666QiandingHuang666 | 下载: 0 | 版本: v1.0(最新)

Slurm HPC 集群助手,为高校学生/教师定制。支持本地(集群上)和远程(集群外)两种使用模式。 TRIGGER 当用户: - 提到 slurm、sbatch、squeue、scancel、salloc、srun、sinfo 等 Slurm 命令 - 提到 hpc 集群、slurm 集群、超算、计算节点、作业调度系统 - 想要查看分区/节点状态、队列情况、GPU 可用性 - 需要提交/取消/查看作业 - 需要申请交互式资源或运行命令 - 需要生成或修改 slurm 作业脚本 - 需要上传/下载文件到 HPC 集群 - 需要连接公共集群、实例或本地集群节点 --- # Slurm 集群助手 跨平台 Slurm HPC 集群管理工具,采用 `server + client + skill` 架构。 --- ## 最小执行协议 ### Step 0:优先使用 Rust 使用: ```bash slurm-client --help ``` 禁止把 Python CLI 当作默认入口。当前 skill 的主链路只应使用 Rust server/client。 若直接执行 `slurm-client` 出现“找不到命令”,立刻改为显式路径重试(例如 `~/.local/bin/slurm-client`),不要继续盲跑后续命令。 ### Step 1:先看本机 server 每次会话开始先执行: ```bash slurm-client server ensure --json ``` ### Step 2:检查连接 ```bash slurm-client connection list --json ``` 然后快速检查现有会话(优先复用活跃会话): ```bash slurm-client session summary --json ``` 分流: - 没有连接:读 `references/workflow_init.md` - 一个连接:直接记录其 `connection_id` - 多个连接:按用户意图选 `cluster`、`instance` 或 `local` - 若存在 `resource-node` 连接,先查看其 `health_state`,优先复用 `online` 状态连接 ### Step 3:按 6 类任务执行 1. 资源查看 ```bash slurm-client status --connection <connection_id> --gpu --json slurm-client find-gpu --connection <connection_id> --json slurm-client partition-info --connection <connection_id> --json ``` 2. 作业管理 ```bash slurm-client jobs --connection <connection_id> --json slurm-client submit --connection <connection_id> <script> --json slurm-client log <job_id> --connection <connection_id> --json slurm-client cancel <job_id> --connection <connection_id> --json slurm-client alloc --connection <connection_id> -p <partition> --json slurm-client run --connection <connection_id> <command>... --json ``` `alloc` 执行规则(必须遵循): - 用户明确要“现在申请/直接申请/申请这张卡”时,必须使用 `--execute` - 禁止只返回 `salloc` 规划命令后让用户手动执行 - 只有在用户明确要求“先看命令不执行”时,才允许不加 `--execute` - 用户提到“抢占xx / 抢占显卡 / 抢占 A100”时,默认解释为:`alloc --preempt --execute` - `--preempt` 模式会自动使用 tmux 运行 `salloc` 并在分配后 `sleep infinity` 保活,避免会话断开导致资源被释放 3. 文件传输 ```bash slurm-client upload <local> <remote> --connection <connection_id> --json slurm-client download <remote> <local> --

更新日志: Source: GitHub https://github.com/QiandingHuang666/skills

目录结构

当前层级: tree/master/slurm-assistant/

  • 📁 evals/
    • 📄 cases.json 3.4 KB
    • 📄 run_eval.sh 7.1 KB
  • 📁 references/
    • 📄 api-contract-v0.md 5.9 KB
    • 📄 architecture-v0.excalidraw 24.7 KB
    • 📄 architecture-v0.md 3.3 KB
    • 📄 commands.md 6.6 KB
    • 📄 common_errors.md 6.9 KB
    • 📄 gzu_public_resources.md 3.3 KB
    • 📄 job_templates.md 10.9 KB
    • 📄 minimal_decision_tree.md 2.3 KB
    • 📄 set_free_password.md 1.4 KB
    • 📄 test-plan-v0.md 5.4 KB
    • 📄 use_gzu.md 2.1 KB
    • 📄 use_local.md 1.1 KB
    • 📄 use_other.md 1.7 KB
    • 📄 workflow_env_config.md 18.8 KB
    • 📄 workflow_file_transfer.md 2.4 KB
    • 📄 workflow_init.md 2.1 KB
    • 📄 workflow_job.md 3.9 KB
    • 📄 workflow_local_execution.md 2.0 KB
    • 📄 workflow_status.md 2.9 KB
  • 📁 rust/
    • 📁 crates/
      • 📁 slurm-client/
        • 📁 src/
          • 📄 main.rs 83.6 KB
        • 📄 Cargo.toml 387 B
      • 📁 slurm-proto/
        • 📁 src/
          • 📄 lib.rs 16.5 KB
        • 📄 Cargo.toml 220 B
      • 📁 slurm-server/
        • 📁 src/
          • 📄 main.rs 83.6 KB
        • 📄 Cargo.toml 533 B
    • 📁 scripts/
      • 📄 live_recovery_smoke_gzu.sh 2.1 KB
      • 📄 live_smoke_gzu.sh 3.7 KB
    • 📄 .gitignore 8 B
    • 📄 Cargo.lock 55.8 KB
    • 📄 Cargo.toml 356 B
  • 📄 SKILL.md 6.2 KB

SKILL.md

登录后下载/点赞/收藏 ❤ 5 | ★ 0
评论 0

请先登录后评论。

评论加载中...