Commands

exec

Run a script on a remote GPU from your terminal, as if it ran locally.

exec submits a Run Job, streams its output while it runs, and exits with the command's exit code.

featherless-cloud exec [options] -- <command> [args...]
featherless-cloud exec --gpu-count 1 -- python -c "import torch; print(torch.cuda.is_available())"
featherless-cloud exec --cpu-cores 32 --volume data:/workspace -- ./preprocess.sh
featherless-cloud exec --template trainer --gpu-count 8 -- python train.py --epochs 10
featherless-cloud exec --detach --name nightly --timeout 7200 -- python eval.py

Your local files aren't uploaded. The command and its files must be in the image or on a mounted volume.

Options

OptionDescription
--name <name>Run Job name. Random when omitted.
--template <name>Template: a name, org/<name>, featherless/<name> or an ID. The default PyTorch environment when omitted.
--template-id <id>Template, by ID.
--template-version <version>Version of an official template. Newest by default.
--image <reference>Container image to run, or to replace the template's.
--registry <name|id>Registry credential for a private image.
--gpu-type <text>GPU model, matched on part of its name.
--gpu-count <n>GPUs: 1, 2, 4 or 8.
--cpu-cores <n>vCPUs. Can't be combined with GPU options.
--disk <gb>Container disk, 20–2,000. Default 20.
--volume <name>:<path>Mount a network volume. Repeatable.
--workdir <path>Working directory. Default /workspace.
--env <K=V>Environment variable. Repeatable.
--secret <K=V>Secret variable, available as a file under $FEATHERLESS_SECRETS_PATH. Repeatable.
--timeout <seconds>Time limit once compute is assigned, 1–86,400. Default 86,400 (24 hours).
--preemption-retries <n>Times to start again from the beginning if interrupted, 0–3. Default 0.
--no-retain-logsDon't collect output, including the live output exec prints.
--idempotency-key <key>Reuse the first Run Job when the same command is retried with the same key.
--detachSubmit and return without waiting.
--cancel-on-interruptCancel the job on Ctrl-C, instead of detaching.
--profile <name>Profile to use.

With a template that has a start command, the command after -- is optional.

Exit codes

CodeMeaning
The command's ownThe job finished.
124The job reached its time limit.
130The job was cancelled, or you detached.
1The job failed to start, or another error.

--json is available with --detach only.