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.
| Option | Description |
|---|---|
--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-logs | Don'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. |
--detach | Submit and return without waiting. |
--cancel-on-interrupt | Cancel 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.
| Code | Meaning |
|---|---|
| The command's own | The job finished. |
124 | The job reached its time limit. |
130 | The job was cancelled, or you detached. |
1 | The job failed to start, or another error. |
--json is available with --detach only.