Metadata-Version: 2.4
Name: bujang-mila
Version: 0.1.2
Summary: bujang plugin: Mila cluster configuration
License-Expression: MIT
Requires-Python: >=3.12
Description-Content-Type: text/markdown

# bujang-mila

[bujang](../../README.md) plugin with the Mila cluster configuration: the clusters
(`bujang_mila/config/clusters.yaml`), their node types and slurm profiles
(`bujang_mila/config/nodes/*.yaml`, `profiles.yaml`).

```bash
uv add "bujang[mila]"          # or: pip install "bujang[mila]", or bujang-mila on its own
```

Installed, the clusters show up in `bujang serve` with no other setup
(`GET /api/slurm/config/sources` shows them coming from `mila`). Override a field in a
user file, e.g. `~/.config/bujang/mila.yaml`:

```yaml
clusters:
  mila:
    remote_folder: ~/scratch/bujang
```

## SSH config

bujang reaches each cluster with `ssh <alias>`. `bujang_mila/config/ssh_config` holds the
matching `~/.ssh/config` entries for every cluster above, plus the Trillium data mover
`tri-dm1`. Install them with your usernames (`MILA_USER` is also used for Lynx,
`ALLIANCE_USER` is your CCDB username):

```bash
bujang ssh install --plugin mila --set MILA_USER=... --set ALLIANCE_USER=...
bujang ssh test --plugin mila      # connect to every cluster, read only
```

The block goes between `# >>> bujang:mila ...` anchors (a backup of the file is made first);
running `install` again after an upgrade updates it in place, `bujang ssh remove --plugin mila`
removes it. On clusters with MFA, run `ssh <alias>` once in a terminal. bujang then reuses that
connection (ControlMaster) until `ControlPersist` expires.

## Examples

`bujang_mila/config/scripts/<cluster>/` has a GPU job per cluster (`<cluster>_gpu_example.sh`, a
CPU one on `trillium`), and for the clusters whose compute nodes have no internet (rorqual, tamia,
trillium-gpu, lynx) two pipelines that prepare where there is internet and run offline: see
[docs/EXAMPLES.md](../../docs/EXAMPLES.md). Rorqual and tamIA got a `login` node type (ssh
executor on the login node) for those steps. The examples use `# {START}` / `# {END}` for bujang's
bookkeeping (see [Script placeholders](../../README.md#script-placeholders)).
