Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计提醒

alliance-ml联盟 ML

Agent Skill

alliance-ml 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

196

周安装

8

GitHub Stars

公开资料未说明

下载量

63
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:alliance-ml(联盟 ML)
来源仓库:https://github.com/ayushnangia/alliance-ml-docs
仓库路径:skills/alliance-ml
安装命令:
npx skills add https://github.com/ayushnangia/alliance-ml-docs --skill alliance-ml
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/ayushnangia/alliance-ml-docs --skill alliance-ml

简介

alliance-ml 协助 ML 研究者在 Alliance Canada HPC 上编写 Slurm 作业脚本。

  • 适用于 GPU 集群调度、Python 环境配置与大规模训练任务管理。
  • 提供登录节点、软件模块与数据路径等快速参考信息。
  • 安装命令:npx skills add https://github.com/ayushnangia/alliance-ml-docs --skill alliance-ml
  • 使用前请确认权限范围、维护状态及是否涉及联网、命令执行或文件读写操作。

SKILL.md

Alliance Canada HPC for ML Researchers

This skill helps you write correct Slurm job scripts, set up Python environments, choose the right GPU cluster, manage data, and scale training on Alliance Canada (formerly Compute Canada) infrastructure.

Alliance clusters use Slurm for scheduling, Lmod for software modules, and virtualenv (never Conda) for Python environments. Pre-built Python wheels are available for most ML packages.

Quick Reference

Connect to a cluster

ssh username@trillium.alliancecan.ca

Cluster login nodes: narval.alliancecan.ca, cedar.alliancecan.ca, trillium.alliancecan.ca, graham.alliancecan.ca, fir.alliancecan.ca, nibi.alliancecan.ca, rorqual.alliancecan.ca

Connect IDE to a compute node (Claude Code, Cursor, VSCode, Codex)

Do NOT run these tools on login nodes — always use a compute node. Banned on Fir and tamIA, should be avoided on all clusters.

Never request GPUs for IDE sessions — these tools don't use GPU compute. Use minimal CPU resources (2 CPUs, 4G RAM).

Internet required: Claude Code and Codex need internet to reach their APIs. Many clusters block internet on compute nodes. Clusters with internet: Fir, Nibi, Vulcan, Killarney. Clusters without: Narval (proxy blocks api.anthropic.com), Trillium, Cedar, Graham. See references/remote-development.md for details.

# One-command workflow (recommended, prompts for time):
cluster-claude fir def-yourpi                             # Claude Code (Fir — has internet)
cluster-claude killarney aip-yourpi                       # Killarney (aip- accounts)
cluster-cursor narval def-yourpi                          # Cursor/VSCode

# Manual workflow:
ssh narval                                                 # 1. login node
salloc --time=3:00:00 --mem=4G --account=def-yourpi        # 2. reserve compute node
srun --pty bash                                            # 3. shell on compute node
# Or from local: ssh -t nc10305 claude (Narval/Rorqual only, needs ProxyJump)

See references/remote-development.md for the cluster-claude/cluster-cursor scripts, SSH ProxyJump setup, per-cluster node prefixes, and Vector Institute workflow.

Set up a Python environment

module load python/3.11
virtualenv --no-download ~/ENV
source ~/ENV/bin/activate
pip install --no-index --upgrade pip
pip install --no-index torch torchvision

# If using HuggingFace datasets/evaluate: load arrow BEFORE install
module load gcc arrow
pip install --no-index datasets evaluate

The --no-index flag uses Alliance pre-built wheels (optimized for cluster hardware). Never use Conda/Anaconda on these clusters.

Important: datasets and evaluate depend on pyarrow, which is provided by the arrow module. You must module load gcc arrow before installing them and every time you activate your virtualenv to use them.

Test before you train

Always run a short test job before submitting long training runs. This catches module issues, data path errors, and GPU visibility problems before you burn hours of allocation.

# Quick GPU test (5-10 min) — works on most clusters
sbatch --time=0:10:00 --gpus-per-node=h100:1 --cpus-per-task=6 \
  --mem=32000M --account=def-yourpi train.sh

# Trillium: use the dedicated debugjob command (fast-start, up to 2h for 1 GPU)
debugjob -g 1

# tamIA: whole GPU nodes only (4×H100 or 8×H200, no partial)
sbatch --time=0:10:00 --gpus=h100:4 --account=aip-yourpi train.sh

Most clusters allow 5-minute minimum for test jobs (vs 1 hour for regular jobs). See references/best-practices.md for a pre-flight checklist.

After any job completes, run seff <jobid> to check actual time/memory usage and right-size future jobs. See references/best-practices.md for the full extrapolation method.

Submit a basic GPU job

#!/bin/bash
#SBATCH --account=def-someuser
#SBATCH --gpus-per-node=a100:1
#SBATCH --cpus-per-task=6
#SBATCH --mem=32000M
#SBATCH --time=0-03:00
#SBATCH --output=%N-%j.out

module load python/3.11
source ~/ENV/bin/activate

python train.py

Submit with sbatch train_job.sh. Check status with sq (alias for your jobs only).

GPU specifiers by cluster

ClusterGPUSlurm specifier
TrilliumH100 80GBh100
FirH100 80GBh100
NibiH100 80GBh100
RorqualH100 80GBh100
KillarneyH100 80GB / L40S 48GBh100 / l40s
NarvalA100 40GBa100
tamIAH100 80GB / H200h100 / h200
VulcanL40S 48GBl40s

Use: --gpus-per-node=h100:1 (or a100:1, l40s:1, etc.)

Storage tiers

FilesystemPurposeQuotaBacked upPurged
$HOMECode, scripts, small configs50 GBYesNo
$SCRATCHLarge temp files, checkpoints20 TBNo60 days
$PROJECTShared datasets, results1 TB (expandable)YesNo
$SLURM_TMPDIRFast local node storage (per job)VariesNoJob end
NearlineLong-term archive2 TBYesNo

For ML datasets: copy to $SLURM_TMPDIR at job start for best I/O performance.

Path conventions: Projects are named after your PI: def-piname (default), rrg-piname (RAC). Symlink layout differs by cluster — always use $SCRATCH and $PROJECT env vars in scripts, not hardcoded paths. See references/storage-data.md for per-cluster details.

Check disk usage

diskusage_report

When to read reference files

The sections below point to detailed reference files. Read the one that matches the user's task:

Remote development (Claude Code, Cursor, VSCode, Codex on clusters)

Read references/remote-development.md when the user needs help with:

  • Connecting Claude Code, Cursor, VSCode, or Codex to a cluster
  • Why IDE/AI tools must NOT run on login nodes (banned on Fir, tamIA — avoid on all)
  • Setting up SSH ProxyJump to reach compute nodes from local IDE
  • The salloc → get node → connect workflow
  • Helper sbatch scripts (remote-dev.sh, remote-dev-gpu.sh) for long sessions
  • VSCode/Cursor remote machine settings (required on all clusters to reduce load)
  • Saving SLURM environment variables for IDE sessions
  • Vector Institute Killarney Jupyter/SSH workflow (vec-playbook)

Getting started (account, SSH, MFA)

Read references/getting-started.md when the user needs help with:

  • Creating an account, first-time setup
  • SSH connections, keys, MFA
  • Basic Linux orientation on clusters

Python environment setup

Read references/python-env.md when the user needs help with:

  • Installing Python packages (pip, wheels)
  • Virtualenv creation and activation
  • Why not Conda, and what to do instead
  • SciPy stack, available wheels
  • Creating virtualenvs inside jobs ($SLURM_TMPDIR)

GPU job submission

Read references/gpu-jobs.md when the user needs help with:

  • Writing GPU job scripts (single/multi-GPU)
  • Choosing GPU types and specifiers
  • MIG (Multi-Instance GPU) partitions
  • CPU/memory ratios per GPU
  • Monitoring GPU jobs (nvidia-smi, nvtop)

Storage and data management

Read references/storage-data.md when the user needs help with:

  • Choosing where to store datasets
  • Filesystem paths per cluster ($SCRATCH, $PROJECT, symlink layout differences)
  • PI project naming (def-piname, rrg-piname)
  • Handling large collections of small files (tar, zip)
  • Using $SLURM_TMPDIR for fast local I/O
  • Transferring data (Globus, scp, rsync)
  • Scratch purging policies

Distributed training

Read references/distributed-training.md when the user needs help with:

  • Multi-GPU training on a single node
  • Multi-node distributed training
  • PyTorch DDP (DistributedDataParallel)
  • DeepSpeed (ZeRO stages, config)
  • torchrun launcher with Slurm
  • NCCL environment variables

Cluster selection guide

Read references/clusters.md when the user needs help with:

  • Which cluster to use for their workload
  • Cluster specs (nodes, GPUs, memory, network)
  • Trillium vs Narval vs Cedar vs others
  • Whole-node scheduling (Trillium) vs per-core (others)

Job management and monitoring

Read references/job-management.md when the user needs help with:

  • Slurm directives (time, memory, account)
  • Job arrays for hyperparameter sweeps
  • Monitoring jobs (squeue, sacct, sstat)
  • Checkpointing long training runs
  • Experiment tracking (W&B, MLflow)
  • W&B per-cluster availability and offline workflow
  • JupyterHub (Fir, Narval, Rorqual)

HuggingFace ecosystem

Read references/huggingface.md when the user needs help with:

  • Installing transformers, datasets, evaluate, accelerate
  • Downloading and caching models (git-lfs, hf CLI, Python)
  • HF_TOKEN setup for gated models (Llama, Gemma, Mistral)
  • Offline mode and environment variables (HF_HOME, TRANSFORMERS_CACHE)
  • HuggingFace Accelerate for multi-GPU / multi-node training
  • Fine-tuning LLMs with FSDP
  • Using pipelines and tokenizers offline
  • Checking dataset configs and splits before loading

Data formats (Arrow, Parquet)

Read references/data-formats.md when the user needs help with:

  • Loading the Arrow module (required for datasets/evaluate)
  • PyArrow with NumPy, Pandas, Parquet
  • Converting CSV to Parquet for efficient storage
  • CUDA-accelerated Arrow
  • Data format selection for ML workloads

Containers (Apptainer)

Read references/containers.md when the user needs help with:

  • Running software in containers on HPC (Apptainer/Singularity)
  • GPU access inside containers (--nv flag)
  • Bind mounts for cluster filesystems (-B /project, -B /scratch)
  • Building SIF images from Docker images
  • Using Conda/Micromamba inside containers
  • Apptainer cache management

vLLM inference serving

Read references/vllm.md when the user needs help with:

  • Installing and running vLLM on Alliance clusters
  • Single-node LLM inference with tensor parallelism
  • Multi-node inference with Ray
  • Downloading and caching HuggingFace models for vLLM

ML best practices

Read references/best-practices.md when the user needs help with:

  • Testing jobs before long runs (test job examples, per-cluster policies, pre-flight checklist, debugjob on Trillium)
  • Job design (splitting training, right-sizing resources)
  • Data I/O optimization (small files problem, $SLURM_TMPDIR)
  • Checkpointing and auto-resubmission patterns
  • Memory management (gradient checkpointing, mixed precision)
  • Experiment organization and reproducibility
  • Common anti-patterns to avoid

Common pitfalls

  1. Running VSCode/Claude Code/Cursor/Codex on login nodes: These tools are resource-heavy and will degrade the shared login node for everyone. Explicitly banned on Fir and tamIA, but should be avoided on all clusters. Always request a compute node with salloc first, then connect your tool to that node. See references/remote-development.md.
  2. Using Conda: Alliance clusters provide optimized wheels. Use virtualenv + pip install --no-index. Conda causes library conflicts and wastes quota.
  3. Not using --no-index: Without it, pip downloads from PyPI instead of using pre-built cluster wheels, which can cause CUDA mismatches.
  4. Forgetting --account: If you belong to multiple allocations, you must specify --account=def-yourpi.
  5. Storing datasets in $HOME: Home is only 50 GB. Use $PROJECT for persistent datasets, $SCRATCH for temporary large files.
  6. Reading many small files from $PROJECT/$SCRATCH: Parallel filesystems are slow with many small files. Archive them with tar and extract to $SLURM_TMPDIR at job start.
  7. Not checkpointing: Jobs have wall-time limits. Save checkpoints regularly so you can resume. Split 3-day training into 3x 24h jobs.
  8. Requesting too much time: Shorter jobs get scheduled faster. Request only what you need.
  9. H100 clusters need torch >= 2.5.1: On Trillium/Fir/Nibi, older PyTorch versions won't work with H100 GPUs.
  10. Using Docker directly: Docker is not available on Alliance HPC clusters (security reasons). Use Apptainer instead. You can convert Docker images to Apptainer SIF files: apptainer build image.sif docker://...
  11. Forgetting module load gcc arrow for datasets/evaluate: These packages depend on pyarrow, which is a system module — not a pip package. Load gcc arrow before installing and every time you use them, or you'll get ModuleNotFoundError: No module named 'pyarrow'.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.4%
按下载量换算21

Claude

31.32%
按下载量换算20

Cursor

18.14%
按下载量换算11

Gemini CLI

8.89%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills