agentleFS
broomvabroomva/skills/skills/compute/remote-gpu/SKILL.md

remote-gpu

Skill4 starsChanged 5 months agoMITView on GitHub

Orchestrate a headless GPU server (NUC, cloud VM, or any SSH-accessible machine) from a local Mac or workstation. Use when: (1) Running GPU workloads remotely (training, inference, video generation), (2) Triggering Claude Code sessions on a remote machine, (3) Launching autoany EGRI loops, symphony orchestrations, or training scripts on remote hardware, (4) Managing jobs on a headless GPU server (submit, monitor, cancel, download results), (5) Setting up SSH tunnels or API bridges to a GPU machine, (6) Orchestrating multi-machine agent workflows. Triggers on: remote gpu, headless server, gpu server, remote training, remote inference, ssh gpu, nuc server, remote claude code, remote agent, gpu orchestration.

  • Reads credentials
  • Installs packages

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 1 is distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All commands work via the gpu-remote.sh shell functions:

    line 147
  2. Distinctive:

    If running the Python API server on the NUC:

    line 175
  3. Very specific:

    Create ~/.config/gpu-remote/config.toml on Mac:

    line 192
  4. Very specific:

    SSH timeout: Add ServerAliveInterval 60 to SSH config

    line 212
  5. Very specific:

    CUDA OOM: Check gpu-status for other jobs using VRAM, cancel or wait

    line 213
  6. Very specific:

    Job stuck: Use gpu-logs JOB_ID to check output, gpu-cancel JOB_ID to kill

    line 214
  7. Very specific:

    File transfer slow: Use gpu-sync (rsync) instead of individual downloads

    line 216

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Remote GPU Orchestrator

Operate a headless GPU server from your Mac. Submit jobs (training, inference, agents), monitor progress, and retrieve results — all over SSH or HTTP API.

Architecture

┌─────────────────┐         SSH / HTTP API        ┌──────────────────────┐
│  Mac (Control)   │ ──────────────────────────▶  │  NUC / GPU Server    │
│                  │                               │                      │
│  - Claude Code   │  Commands:                    │  - RTX 4090 (12GB)   │
│  - This skill    │    submit_job                  │  - gpu-server.py     │
│  - gpu-remote.sh │    check_status               │  - Job queue         │
│                  │    stream_logs                 │  - Claude Code       │
│                  │    download_results            │  - autoany / symphony│
│                  │    run_claude_session          │  - LTX-2 / training  │
└─────────────────┘                               └──────────────────────┘

Quick Setup

1. Configure SSH Access

# On Mac — set up passwordless SSH to NUC
ssh-keygen -t ed25519 -f ~/.ssh/nuc_gpu
ssh-copy-id -i ~/.ssh/nuc_gpu.pub user@NUC_IP

# Add to ~/.ssh/config
cat >> ~/.ssh/config << 'EOF'
Host nuc-gpu
  HostName NUC_IP_ADDRESS
  User YOUR_USER
  IdentityFile ~/.ssh/nuc_gpu
  Port 22
  ServerAliveInterval 60
EOF

# Test
ssh nuc-gpu "nvidia-smi"

2. Install Server on NUC

# SSH into NUC
ssh nuc-gpu

# Copy and start the server
pip install fastapi uvicorn psutil
python gpu-server.py --port 8420 --workdir ~/gpu-jobs

Or run scripts/setup-nuc.sh nuc-gpu from Mac to automate.

3. Use from Mac

# Via SSH (simplest)
source scripts/gpu-remote.sh
gpu-submit "python train.py --epochs 10" --workdir ~/project
gpu-status
gpu-logs job-abc123
gpu-download job-abc123

# Via HTTP API (if gpu-server.py running)
curl http://nuc-gpu:8420/submit -d '{"command":"python train.py"}'
curl http://nuc-gpu:8420/jobs

Job Types

Training Runs

# Submit a training job
gpu-submit "cd ~/project && python train.py --config config.yaml" \
  --name "lora-training-v2" \
  --workdir ~/project

# Monitor GPU usage during training
gpu-watch  # streams nvidia-smi every 5s

Video Generation (LTX-2)

gpu-submit "cd ~/LTX-2 && source .venv/bin/activate && \
  python -m ltx_pipelines.run \
    --config configs/ltx-2.3-22b-distilled-2stage.yaml \
    --quantization fp8-cast \
    --prompt 'A drone shot over mountains at dawn' \
    --height 704 --width 1216 --num_frames 97 \
    --output /tmp/output.mp4" \
  --name "ltx-mountains" \
  --download /tmp/output.mp4

Claude Code Sessions

# Start a Claude Code session on the NUC
gpu-claude "Fix the failing tests in ~/project" --workdir ~/project

# Start with a specific branch
gpu-claude "Implement the feature described in PLAN.md" \
  --workdir ~/project --branch feature/new-api

Autoany EGRI Loops

# Run an EGRI optimization loop on GPU
gpu-submit "cd ~/autoany && cargo run -- \
  --config egri.toml \
  --max-iterations 50 \
  --target-metric accuracy" \
  --name "egri-optimization"

Symphony Orchestrations

# Launch a symphony workflow on GPU
gpu-submit "cd ~/symphony && cargo run -- \
  orchestrate workflow.toml" \
  --name "symphony-pipeline"

Commands Reference

All commands work via the gpu-remote.sh shell functions:

CommandDescription
gpu-submit CMDSubmit a job, returns job ID
gpu-statusShow all jobs and GPU state
gpu-logs JOB_IDStream logs from a job
gpu-cancel JOB_IDCancel a running job
gpu-download JOB_ID [FILE]Download job output files
gpu-watchLive GPU monitoring (nvidia-smi)
gpu-claude PROMPTStart Claude Code session on NUC
gpu-sshInteractive SSH to NUC
gpu-sync DIRrsync a directory to/from NUC
gpu-tunnel PORTSSH tunnel a port from NUC to localhost

Options

--name NAME        Human-readable job name
--workdir DIR      Working directory on NUC
--branch BRANCH    Git branch to checkout before running
--download FILE    Auto-download this file when job completes
--gpu GPU_ID       Target GPU index (default: 0)
--timeout SECS     Job timeout (default: 3600)

HTTP API (gpu-server.py)

If running the Python API server on the NUC:

EndpointMethodDescription
/submitPOSTSubmit job {command, name, workdir, timeout}
/jobsGETList all jobs with status
/jobs/{id}GETJob detail (status, logs, files)
/jobs/{id}/logsGETStream job logs (SSE)
/jobs/{id}/cancelPOSTCancel running job
/jobs/{id}/filesGETList output files
/jobs/{id}/files/{name}GETDownload a file
/statusGETGPU info, disk, memory

See references/api-reference.md for full API documentation.

Configuration

Create ~/.config/gpu-remote/config.toml on Mac:

[server]
host = "nuc-gpu"          # SSH host alias or IP
port = 8420               # API server port (if using HTTP)
user = "your-user"        # SSH user
mode = "ssh"              # "ssh" or "api"

[defaults]
workdir = "~/gpu-jobs"
timeout = 3600
gpu_id = 0

[sync]
exclude = [".git", "node_modules", "__pycache__", ".venv"]

Troubleshooting

  • SSH timeout: Add ServerAliveInterval 60 to SSH config
  • CUDA OOM: Check gpu-status for other jobs using VRAM, cancel or wait
  • Job stuck: Use gpu-logs JOB_ID to check output, gpu-cancel JOB_ID to kill
  • Server down: SSH in and restart: ssh nuc-gpu "python gpu-server.py &"
  • File transfer slow: Use gpu-sync (rsync) instead of individual downloads

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.