# SSH workflows

## From your laptop / local machine

The aliases in `~/.ssh/config` make this one-line:

```bash
ssh dgx        # head node
ssh dgx01      # compute node, jumps via head
ssh dgx02      # compute node, jumps via head
ssh robot-lab  # YAM workstation
```

## Reserving a DGX compute node before running a job

1. Check the live dashboard (URL TBD — ask Sergey) for node status
2. Put yourself on the reservation list for the node you want
3. `ssh dgx0X` to land on the compute node
4. Launch your Docker job

## Running jobs in Docker on DGX

Lab convention: **all jobs in Docker, no exceptions.** A bare `python train.py` on a compute node is a faux pas.

Typical pattern (refine as you learn the lab's specifics):

```bash
# inside compute node
docker run --gpus all --rm -it \
    -v /home/cameron.smith/code:/workspace \
    -v /home/cameron.smith/data:/data \
    --shm-size=32g \
    <lab_base_image>:latest \
    bash -lc "cd /workspace && python train.py ..."
```

Ask Sergey or look at lab examples for:
- The blessed base image
- Standard `-v` mounts (shared scratch? home? /data?)
- Whether the lab uses `--name` conventions or job queues

## Connecting to YAM workstation

```bash
ssh robot-lab
source ~/raiden/.venv/bin/activate
# launch visualizer from repo root
rd visualize --web
```

Sample data is at `/home/robot-lab/data/processed`.

## File transfer

- DGX ↔ local: `scp` or `rsync` works through the head node alias
  ```bash
  rsync -avz file dgx:/path/
  rsync -avz file dgx01:/path/   # uses ProxyJump automatically
  ```
- YAM ↔ DGX: TBD — fill in as you learn (probably rsync via host network)
