GitHub Actions hosted runners do not have GPUs. If your CI tests GPU code, runs small fine-tunes, or validates inference changes, you need a self-hosted runner. On our dedicated GPU hosting standing one up takes 15 minutes.
Contents
Setup
In your GitHub repo settings, go to Actions -> Runners -> New self-hosted runner. Follow the displayed commands on your GPU server:
mkdir actions-runner && cd actions-runner
curl -o actions-runner-linux-x64-2.321.0.tar.gz -L \
https://github.com/actions/runner/releases/download/v2.321.0/actions-runner-linux-x64-2.321.0.tar.gz
tar xzf actions-runner-linux-x64-2.321.0.tar.gz
./config.sh --url https://github.com/yourorg/yourrepo --token <token>
./run.sh
Install as a service:
sudo ./svc.sh install
sudo ./svc.sh start
Workflow
name: GPU Tests
on: [push]
jobs:
test:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- run: nvidia-smi
- run: pip install -r requirements.txt
- run: pytest tests/gpu/
Target the runner via runs-on: self-hosted or use custom labels if you have multiple runners with different GPUs.
Isolation
GitHub runners run arbitrary code from your CI pipeline. Do not share a runner with your production inference. Best practices:
- Dedicated user account with minimal permissions
- Ephemeral runners for each job (
--ephemeralflag) - Run in a container with GPU passthrough to isolate filesystem
- No production secrets on the runner host
Security
Do not enable self-hosted runners on public repos – any PR from a stranger could run arbitrary code on your GPU. For public repos use GitHub’s cloud runners or require manual approval.
CI With GPU Access
UK dedicated GPU hosting with GitHub Actions runners ready to register.
Browse GPU ServersSee remote VS Code.