GPU Compute / Recipe
Batch inference and evals
Run large-scale offline inference, eval scripts, or scoring pipelines on a GPU. Use --detach to launch and check logs separately, or omit it to stream output directly.
npm install -g badgr-cli then badgr login. Setup guide →Run an eval script
badgr run . --cmd "python eval.py" --gpu L40S --max-cost 10
Badgr zips your project folder, installs deps from requirements.txt, and streams logs in real time. Outputs are stored for 48 hours. Billing stops when the script exits.
Detach and check logs later
Use --detach for long-running jobs. Badgr returns the deployment ID immediately.
# Launch and return immediately badgr run . --cmd "python eval.py" --gpu L40S --max-cost 10 --detach # Follow logs when you are ready badgr logs <deployment-id>
Pass datasets and environment
badgr run . --cmd "python eval.py" --gpu L40S \ --env HF_TOKEN=$HF_TOKEN \ --env DATASET=my-org/eval-set \ --env OUTPUT_FILE=/app/results.jsonl \ --max-cost 10
Custom image (escape hatch)
For unusual dependencies that can't be covered by requirements.txt, bring your own container:
badgr run . --cmd "python eval.py" \ --image ghcr.io/my-org/eval-runner:latest \ --gpu A100 \ --env HF_TOKEN=$HF_TOKEN \ --max-cost 10
Cap spend
badgr run . --cmd "python eval.py" --gpu A100 \ --max-cost 20.00 \ --max-runtime 240
Job auto-stops when either limit is hit. Check badgr receipts for final cost.
Check cost
badgr receipts
Options
--gpu <type>GPU type: L40S, A100, H100, RTX_4090. Omit to let Badgr Auto select.--cmd <command>Command to run inside the uploaded project or cloned repo.--image <img>Custom Docker image — bypasses the runner. Use for unusual dependencies.--env KEY=VALUEEnvironment variable — repeatable--region US|EU|AURegion preference. Omit for global best-capacity search.--tier 1|21 = managed providers (default), 2 = marketplace budget providers--max-price 2.00Hard hourly cap — job won't start if no GPU is under this price--max-cost 20.00Auto-stop when total spend reaches this amount--max-runtime 240Auto-stop after N minutes--detachReturn immediately — use badgr logs <id> to follow