This guide explains how to set up a self-hosted Windows runner with NVIDIA T4 GPU for testing trtx-rs with real TensorRT-RTX.
- Windows machine with NVIDIA T4 GPU (or compatible GPU)
- Sufficient disk space for dependencies (~10GB)
- Windows 10/11 or Windows Server
- NVIDIA GPU drivers (latest recommended)
- CUDA Toolkit (compatible with TensorRT-RTX version)
- TensorRT-RTX installation
- Download from NVIDIA Driver Downloads
- Install and reboot
- Verify:
nvidia-smishould show your T4 GPU
- Download from NVIDIA CUDA Toolkit
- Install to default location (e.g.,
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.x) - Verify:
nvcc --version
- Download from NVIDIA Developer
- Extract to a permanent location (e.g.,
C:\TensorRT-RTX) - Set environment variable:
[System.Environment]::SetEnvironmentVariable('TENSORRT_RTX_DIR', 'C:\TensorRT-RTX', 'Machine')
- Download from rustup.rs
- Install with default settings
- Verify:
rustc --version
- Go to your GitHub repository
- Settings → Actions → Runners → New self-hosted runner
- Choose Windows
- Follow the installation instructions
When configuring the runner, add these labels:
self-hosted(automatic)windows(automatic)gpu(add manually)t4(add manually)
To add labels:
.\config.cmd --url https://github.com/rustnn/trtx-rs --token YOUR_TOKEN --labels gpu,t4# Run as Administrator
.\svc.sh install
.\svc.sh startOn the runner machine, set these system environment variables:
# As Administrator
[System.Environment]::SetEnvironmentVariable('CUDA_PATH', 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.x', 'Machine')
[System.Environment]::SetEnvironmentVariable('TENSORRT_RTX_DIR', 'C:\TensorRT-RTX', 'Machine')
# Add to PATH
$oldPath = [System.Environment]::GetEnvironmentVariable('Path', 'Machine')
$newPath = "$oldPath;C:\TensorRT-RTX\lib;$env:CUDA_PATH\bin"
[System.Environment]::SetEnvironmentVariable('Path', $newPath, 'Machine')Restart the runner service after setting variables:
.\svc.sh stop
.\svc.sh startnvidia-smiExpected output: Should show T4 GPU info
nvcc --versionExpected output: CUDA version info
dir $env:TENSORRT_RTX_DIR\include
dir $env:TENSORRT_RTX_DIR\libExpected output: Should list TensorRT headers and libraries
GPU tests run automatically on:
- Push to
mainbranch (if trtx code changed) - Pull requests to
main(if trtx code changed)
- Go to Actions tab
- Select "GPU Tests (Windows T4)"
- Click "Run workflow"
- Check runner status in Settings → Actions → Runners
- Verify labels are set correctly (gpu, t4)
- Restart runner service
- Verify environment variables are set at Machine level (not User)
- Restart runner service after changing variables
- Check PATH includes CUDA and TensorRT lib directories
- Check CUDA version compatibility with TensorRT-RTX
- Verify GPU drivers are up to date
- Check disk space
- Run
nvidia-smion runner machine - Check GPU is not being used by other processes
- Verify drivers are installed correctly
Self-hosted runners have access to repository secrets and can execute code. For security:
- Use a dedicated machine: Don't use a shared or personal workstation
- Restrict network access: Configure firewall rules
- Monitor usage: Review runner logs regularly
- Keep updated: Update OS, drivers, and dependencies
- Use runner groups: Limit which workflows can use the runner
Self-hosted runners are free from GitHub's perspective, but consider:
- Hardware costs (GPU machine)
- Power consumption
- Network bandwidth
- Maintenance time
For occasional testing, consider:
- Using the manual workflow trigger
- Limiting automatic triggers with path filters
- Setting up on-demand runner activation
If maintaining a physical machine is not feasible, consider:
- AWS EC2 G4 instances (T4 GPUs)
- Azure NC T4 v3 instances
- Google Cloud Compute with T4 GPUs
Configure these as ephemeral self-hosted runners that spin up on demand.