CH·02CLI reference

gpu jobs submit

Submit a batch job

Submit a batch job

Synopsis

Queues a job that runs in the container on one GPU.

The command replaces the image's entrypoint. Everything after -- is the command.

The three opt-ins: --allow-sharing the job may share a GPU with your own other jobs --allow-restart the job may be stopped and started again (needed for sharing, and for retry after it runs out of GPU memory) --max-wait how long the job may wait for space on a machine you already have before a new machine is started for it

--memory-hint-mb is the peak GPU memory you expect the job to use. With no hint, the job is sized from earlier runs under the same --name (digits ignored); with neither, it gets a whole GPU.

--compute-hint-pct is the share of time you expect the job to keep the GPU busy (1 to 100). Jobs share a GPU only while their compute duties add up to at most 100%. With no hint, the duty is measured from earlier runs; with neither, the job counts as 100% and gets a GPU to itself until it has been measured.

A job is given a checkpoint directory (GPUAI_CHECKPOINT_DIR, mounted at --checkpoint-path) that survives a restart on the same machine.

Submitting a job starts a machine billed to your balance at its normal hourly price.

gpu jobs submit --image <image> (--gpu-type <type> | --min-vram-gb <n>) [flags] -- <command> [args...]

Examples

  gpu jobs submit --name nightly-eval --image ghcr.io/acme/eval:1.4 --gpu-type a100_80gb \
      --memory-hint-mb 9000 --compute-hint-pct 30 --allow-sharing --allow-restart --max-wait 10m \
      -- python eval.py --suite full

Options

      --allow-restart            Let the job be stopped and started again
      --allow-sharing            Let the job share a GPU with your own other jobs
      --checkpoint-path string   Where the checkpoint directory is mounted in the container (default /gpuai/checkpoint)
      --compute-hint-pct int     Share of time you expect the job to keep the GPU busy, 1 to 100
      --env stringArray          Environment variable KEY=VALUE for the job (repeatable)
      --gpu-type string          GPU model, e.g. a100_80gb ('gpu gpu-types' lists them)
  -h, --help                     help for submit
      --image string             Container image to run (required)
      --isolation string         soft (default) or hard: hard runs the job in a GPU slice (NVIDIA MIG) of its own, where available
      --max-price float          Highest hourly machine price to accept, in USD
      --max-retries int          Retries after running out of GPU memory, 0 to 5 (default 2)
      --max-wait duration        How long the job may wait for space on a machine you already have, e.g. 10m (default: do not wait)
      --memory-hint-mb int       Peak GPU memory you expect the job to use, in MiB
      --min-vram-gb int          Smallest GPU memory the job accepts, in GB, when no --gpu-type is given
      --name string              Job name. Runs under the same name (digits ignored) share memory history
      --timeout duration         Longest the job may run, e.g. 2h (default 1h)

Options inherited from parent commands

      --api-base string   API base URL (override with GPUAI_API_BASE env) (default "https://api.gpu.ai/v1")
      --debug             Enable debug logging to stderr
  -o, --output string     Output format: table|json (default table on TTY, json otherwise)

SEE ALSO

← The gpu CLI