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.

Command

badgr run python train.py --gpu A100

Badgr mounts your current directory into /app and runs python train.py. Logs stream to your terminal in real time. Exit code is passed through.

Pass environment variables

badgr run python train.py --gpu A100 \
  --env HF_TOKEN=$HF_TOKEN \
  --env WANDB_API_KEY=$WANDB_API_KEY

Use a custom Docker image

badgr run --image pytorch/pytorch:2.3.0-cuda12.1-cudnn8-runtime \
  python train.py --gpu A100

Defaults to python:3.11-slim when no image is specified.

Check cost after

badgr receipts

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

Options

--gpu A100GPU type (RTX_4090, L40S, A6000, A100, H100)
--image <img>Docker image (default: python:3.11-slim)
--env KEY=VALUEEnvironment variable (repeatable)
--region <region>Optional region preference. If omitted, Badgr chooses best available capacity.
--max-price 2.00Hard price cap in USD/hr
--detachLaunch and return immediately — use badgr logs to follow