Skip to main content

targon rental

Deploy and manage container rentals.

targon rental <COMMAND>

For read-only inspection of any workload type (including rentals), use targon workload.

Shared spec options

These flags apply to deploy and create:

FlagDescription
--name <NAME>Rental name
--image <IMAGE>Container image
--resource <SKU>Inventory SKU (see targon inventory)
--env KEY=VALEnvironment variable (repeatable)
--port PORT[/PROTO[/ROUTING]]Exposed port; protocol TCP, UDP, or SCTP; routing PROXIED or DIRECT
--volume UID:/path[:ro]Volume mount (repeatable)
--ssh-key UIDSSH key to attach (repeatable)
--command <CMD>Container command (repeatable)
--arg <ARG>Container argument (repeatable)
--project <UID>Project to assign (default: active project from project use)
--registry-server <URL>Private registry server
--registry-user <USER>Registry username
--registry-pass <PASS>Registry password

When required flags are omitted in an interactive terminal, the CLI prompts for them and can show an inventory picker for --resource.

targon rental deploy

Register and start a rental.

targon rental deploy [OPTIONS] [-y]

Use -y to skip the confirmation prompt.

targon rental deploy \
--name my-job \
--image pytorch/pytorch:latest \
--resource h200-small \
--port 8080/TCP/PROXIED \
--port 2222/TCP/DIRECT

targon rental create

Register a rental without starting it.

targon rental create [OPTIONS] [-y]

Accepts the same spec flags as deploy. After creation, start with targon rental start <UID>.

targon rental start

Start a registered or suspended rental.

targon rental start <UID>

targon rental list

List rentals.

targon rental list [OPTIONS]
FlagDescription
--status <STATUS>Filter by lifecycle status (alias: --state)
--project <UID>Filter by project
--name <NAME>Filter by name
--limit <N>Max results (default: 50)
--cursor <CURSOR>Pagination cursor

targon rental exec

Run a command inside a running rental.

targon rental exec <UID> -- <COMMAND> [ARGS...]

Not supported for VM workloads.

targon rental suspend

Suspend a running rental.

targon rental suspend <UID>

targon rental attach-volume

Attach a volume to a rental.

targon rental attach-volume <UID> <VOLUME_UID> --mount-path <PATH> [--read-only]

targon rental detach-volume

Detach a volume from a rental.

targon rental detach-volume <UID> <VOLUME_UID>

targon rental attach-ssh-key

Attach an SSH key to a rental.

targon rental attach-ssh-key <UID> <SSH_KEY_UID>

targon rental detach-ssh-key

Detach an SSH key from a rental.

targon rental detach-ssh-key <UID> <SSH_KEY_UID>