-
Notifications
You must be signed in to change notification settings - Fork 23
Move skills to .claude/skills/ for Claude Code #444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,68 @@ | ||||||
| # Remote GPU Testing for GitHub Actions | ||||||
|
|
||||||
| Local machine is macOS with no GPUs. To test GitHub Action workflows and GPU code, run them on remote machines via SSH. | ||||||
|
|
||||||
| ## Machines | ||||||
|
|
||||||
| <!-- Add machines here, e.g.: --> | ||||||
| <!-- - **gpu-box**: `ssh user@10.0.0.1` --> | ||||||
| <!-- - **train-server**: `ssh -i ~/.ssh/key user@hostname.com` --> | ||||||
|
|
||||||
| ## How to run remote commands | ||||||
|
|
||||||
| Never run GPU code locally. Always use this pattern: | ||||||
|
|
||||||
| 1. **Set up a tmux session** on the remote machine (idempotent): | ||||||
| ```bash | ||||||
| ssh host "tmux new-session -d -s work || true" | ||||||
| ``` | ||||||
|
|
||||||
| 2. **Run commands** via send-keys, always tee to a log file: | ||||||
| ```bash | ||||||
| ssh host "tmux send-keys -t work 'command 2>&1 | tee /tmp/jobname.log' Enter" | ||||||
| ``` | ||||||
|
|
||||||
| 3. **Check output** by tailing the log file directly: | ||||||
| ```bash | ||||||
| ssh host "tail -100 /tmp/jobname.log" | ||||||
| ``` | ||||||
|
|
||||||
| 4. **Check if a command is still running**: | ||||||
| ```bash | ||||||
| ssh host "pgrep -f command_name" | ||||||
| ``` | ||||||
|
|
||||||
| ## Testing GitHub Actions locally on a remote GPU machine | ||||||
|
|
||||||
| To replicate what a GitHub Action workflow does on a remote GPU box: | ||||||
|
|
||||||
| 1. **Push code to the remote machine**: | ||||||
| ```bash | ||||||
| rsync -avz --exclude '.git' --exclude '__pycache__' ./ host:/home/user/kernelbot/ | ||||||
| ``` | ||||||
|
|
||||||
| 2. **Set up the environment** (mirrors the GH Action): | ||||||
| ```bash | ||||||
| ssh host "tmux send-keys -t work 'cd /home/user/kernelbot && pip install -r requirements-dev.txt && pip install -e . 2>&1 | tee /tmp/setup.log' Enter" | ||||||
|
||||||
| ssh host "tmux send-keys -t work 'cd /home/user/kernelbot && pip install -r requirements-dev.txt && pip install -e . 2>&1 | tee /tmp/setup.log' Enter" | |
| ssh host "tmux send-keys -t work 'cd /home/user/kernelbot && (pip install -r requirements-dev.txt && pip install -e .) 2>&1 | tee /tmp/setup.log' Enter" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,4 +10,5 @@ package-lock.json | |
| reference-kernels/ | ||
| yoyo.ini | ||
| .venv | ||
| .claude/ | ||
| .claude/* | ||
| !.claude/skills/ | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using
|| truemakes the command appear successful even whentmuxfails for real reasons (e.g., tmux not installed, permission issues), which can mask problems and lead to confusing follow-on failures. Prefer an idempotent check that only suppresses the 'session already exists' case (e.g.,tmux has-session ... || tmux new-session ...) so genuine failures still surface.