GPU Compute / Recipe

Run a one-off GPU job

badgr run provisions a GPU, runs your command inside a container, streams logs to your terminal, and stops the instance when the job exits. Billing stops automatically — you are not charged for idle time.

Prerequisites: npm install -g badgr-cli then badgr login. Setup guide →

Run a local project folder

badgr run . --cmd "python train.py" --gpu A100 --max-cost 10

Badgr zips your current directory, uploads it, picks the right runner (badgr-python-runner or badgr-node-runner), installs dependencies from requirements.txt or package.json, runs the command, and stores outputs for 48 hours. Billing stops when the job exits. --max-cost is required.

Run from a GitHub repo

badgr run https://github.com/user/repo --cmd "python train.py" --gpu A100 --max-cost 10

No upload step — the runner clones the repo directly. Use this for open-source projects and CI pipelines.

Pass environment variables

badgr run . --cmd "python train.py" --gpu A100 \
  --env HF_TOKEN=$HF_TOKEN \
  --env WANDB_API_KEY=$WANDB_API_KEY \
  --max-cost 10

Custom image (escape hatch)

For unusual dependencies, skip the runner and bring your own container. --image bypasses automatic runtime detection.

badgr run . --image pytorch/pytorch:2.3.0-cuda12.1-cudnn8-runtime \
  --cmd "python train.py" --gpu A100 --max-cost 10

Detach and check later

# Launch and return immediately
badgr run . --cmd "python train.py" --gpu A100 --max-cost 10 --detach

# Check what is running
badgr status

# Stream logs
badgr logs <deployment-id>

Cap spend

badgr run . --cmd "python train.py" --gpu A100 \
  --max-cost 10.00 \
  --max-runtime 120

--max-cost auto-stops when total spend reaches that amount. --max-runtime stops after N minutes regardless of cost.

Check cost after

badgr receipts

Shows provider, GPU, latency, and cost for every job.

Options

--cmd <command>Command to run inside the uploaded project or cloned repo (required for folder/GitHub flows).
--gpu <type>GPU type: RTX_4090, L40S, A6000, A100, A100_80GB, H100. Omit to let Badgr Auto select.
--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 in USD/hr — job won't start if no GPU is under this price
--max-cost 10.00Auto-stop when total spend reaches this amount
--max-runtime 120Auto-stop after N minutes
--detachReturn immediately with deployment ID — use badgr logs to follow
--save <name>Save this job as a named workload for easy re-running later