[{"data":1,"prerenderedAt":417},["ShallowReactive",2],{"page-\u002Frun-jobs\u002Fsubmit":3,"surround-\u002Frun-jobs\u002Fsubmit":409},{"id":4,"title":5,"body":6,"description":401,"extension":402,"meta":403,"navigation":404,"path":405,"seo":406,"stem":407,"__hash__":408},"docs\u002Frun-jobs\u002Fsubmit.md","Submit a Run Job",{"type":7,"value":8,"toc":394},"minimark",[9,13,23,180,198,202,322,334,338,345,349,366,370,390],[10,11,12],"p",{},"This page shows how to submit a Run Job with the CLI. Each one needs compute, an image and a command.",[14,15,17],"h2",{"id":16},"run-a-job",[18,19,22],"span",{"className":20},[21],"sr-only","Run a job",[24,25,27,32,40,62,66,73,104,107,111,122],"steps",{"level":26},"4",[28,29,31],"h4",{"id":30},"install-and-sign-in","Install and sign in",[10,33,34,39],{},[35,36,38],"a",{"href":37},"\u002Fcli","Install the CLI"," and sign in:",[41,42,47],"pre",{"className":43,"code":44,"language":45,"meta":46,"style":46},"language-bash shiki shiki-themes github-dark-default","featherless-cloud login\n","bash","",[48,49,50],"code",{"__ignoreMap":46},[18,51,54,58],{"class":52,"line":53},"line",1,[18,55,57],{"class":56},"sQhOw","featherless-cloud",[18,59,61],{"class":60},"s9uIt"," login\n",[28,63,65],{"id":64},"run-a-command","Run a command",[10,67,68,69,72],{},"Put the command after ",[48,70,71],{},"--",":",[41,74,76],{"className":43,"code":75,"language":45,"meta":46,"style":46},"featherless-cloud exec --gpu-count 1 -- python -c \"import torch; print(torch.cuda.get_device_name(0))\"\n",[48,77,78],{"__ignoreMap":46},[18,79,80,82,85,89,92,95,98,101],{"class":52,"line":53},[18,81,57],{"class":56},[18,83,84],{"class":60}," exec",[18,86,88],{"class":87},"sFSAA"," --gpu-count",[18,90,91],{"class":87}," 1",[18,93,94],{"class":87}," --",[18,96,97],{"class":60}," python",[18,99,100],{"class":87}," -c",[18,102,103],{"class":60}," \"import torch; print(torch.cuda.get_device_name(0))\"\n",[10,105,106],{},"The CLI waits for the job, streams its output, and exits with the command's exit code.",[28,108,110],{"id":109},"choose-the-image-and-data","Choose the image and data",[10,112,113,114,117,118,121],{},"Without ",[48,115,116],{},"--template"," or ",[48,119,120],{},"--image",", the job runs the default PyTorch environment. Mount network volumes for input and output:",[41,123,125],{"className":43,"code":124,"language":45,"meta":46,"style":46},"featherless-cloud exec \\\n  --template featherless\u002Frocm-pytorch \\\n  --gpu-count 1 \\\n  --volume my-data:\u002Fworkspace \\\n  -- python \u002Fworkspace\u002Ftrain.py\n",[48,126,127,137,148,158,169],{"__ignoreMap":46},[18,128,129,131,133],{"class":52,"line":53},[18,130,57],{"class":56},[18,132,84],{"class":60},[18,134,136],{"class":135},"suJrU"," \\\n",[18,138,140,143,146],{"class":52,"line":139},2,[18,141,142],{"class":87},"  --template",[18,144,145],{"class":60}," featherless\u002Frocm-pytorch",[18,147,136],{"class":135},[18,149,151,154,156],{"class":52,"line":150},3,[18,152,153],{"class":87},"  --gpu-count",[18,155,91],{"class":87},[18,157,136],{"class":135},[18,159,161,164,167],{"class":52,"line":160},4,[18,162,163],{"class":87},"  --volume",[18,165,166],{"class":60}," my-data:\u002Fworkspace",[18,168,136],{"class":135},[18,170,172,175,177],{"class":52,"line":171},5,[18,173,174],{"class":87},"  --",[18,176,97],{"class":60},[18,178,179],{"class":60}," \u002Fworkspace\u002Ftrain.py\n",[10,181,182,183,186,187,190,191,197],{},"Use ",[48,184,185],{},"--cpu-cores \u003Cn>"," instead of ",[48,188,189],{},"--gpu-count"," for CPU compute. See ",[35,192,194],{"href":193},"\u002Fcli\u002Fexec",[48,195,196],{},"exec"," for every option.",[14,199,201],{"id":200},"run-job-options","Run Job options",[203,204,205,221],"table",{},[206,207,208],"thead",{},[209,210,211,215,218],"tr",{},[212,213,214],"th",{},"Option",[212,216,217],{},"Flag",[212,219,220],{},"Default",[222,223,224,238,251,266,279,292,308],"tbody",{},[209,225,226,230,235],{},[227,228,229],"td",{},"Time limit, up to 24 hours",[227,231,232],{},[48,233,234],{},"--timeout \u003Cseconds>",[227,236,237],{},"24 hours",[209,239,240,243,248],{},[227,241,242],{},"Retries after an interruption, 0–3",[227,244,245],{},[48,246,247],{},"--preemption-retries \u003Cn>",[227,249,250],{},"0",[209,252,253,256,261],{},[227,254,255],{},"Working directory",[227,257,258],{},[48,259,260],{},"--workdir \u003Cpath>",[227,262,263],{},[48,264,265],{},"\u002Fworkspace",[209,267,268,271,276],{},[227,269,270],{},"Container disk, 20–2,000 GiB",[227,272,273],{},[48,274,275],{},"--disk \u003Cgb>",[227,277,278],{},"20",[209,280,281,284,289],{},[227,282,283],{},"Network volumes, up to 8",[227,285,286],{},[48,287,288],{},"--volume \u003Cname>:\u003Cpath>",[227,290,291],{},"None",[209,293,294,297,306],{},[227,295,296],{},"Environment variables and secrets",[227,298,299,302,303],{},[48,300,301],{},"--env K=V",", ",[48,304,305],{},"--secret K=V",[227,307,291],{},[209,309,310,313,319],{},[227,311,312],{},"Collect output",[227,314,315,318],{},[48,316,317],{},"--no-retain-logs"," turns it off",[227,320,321],{},"On",[10,323,324,325,328,329,333],{},"The time limit starts when compute is assigned, not when you submit, and covers all retries together. Secrets are files under ",[48,326,327],{},"$FEATHERLESS_SECRETS_PATH",", not environment variables; see ",[35,330,332],{"href":331},"\u002Ftemplates\u002Fcustom-images#read-secrets-in-your-code","Secret variables",".",[14,335,337],{"id":336},"retry-safely","Retry safely",[10,339,340,341,344],{},"Submitting the same job twice with the same ",[48,342,343],{},"--idempotency-key \u003Ckey>"," returns the first job instead of starting another, so a script can retry a submission safely.",[14,346,348],{"id":347},"run-in-the-background","Run in the background",[10,350,351,354,355,358,359,361,362,365],{},[48,352,353],{},"--detach"," submits the job and returns at once. Follow it later with ",[48,356,357],{},"featherless-cloud runjob logs \u003Cjob-id> --follow",", using the ID it prints. Pressing Ctrl-C while ",[48,360,196],{}," waits also detaches; add ",[48,363,364],{},"--cancel-on-interrupt"," to cancel the job instead.",[14,367,369],{"id":368},"next-steps","Next steps",[371,372,373,382],"card-group",{},[374,375,379],"card",{"icon":376,"title":377,"to":378},"i-lucide-activity","Monitor and manage","\u002Frun-jobs\u002Fmanage",[10,380,381],{},"Follow, cancel and delete Run Jobs.",[374,383,387],{"icon":384,"title":385,"to":386},"i-lucide-graduation-cap","Fine-tune with a Run Job","\u002Fexamples\u002Ffine-tune-run-job",[10,388,389],{},"An end-to-end example with a network volume.",[391,392,393],"style",{},"html pre.shiki code .sQhOw, html code.shiki .sQhOw{--shiki-default:#FFA657}html pre.shiki code .s9uIt, html code.shiki .s9uIt{--shiki-default:#A5D6FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .sFSAA, html code.shiki .sFSAA{--shiki-default:#79C0FF}html pre.shiki code .suJrU, html code.shiki .suJrU{--shiki-default:#FF7B72}",{"title":46,"searchDepth":139,"depth":139,"links":395},[396,397,398,399,400],{"id":16,"depth":139,"text":22},{"id":200,"depth":139,"text":201},{"id":336,"depth":139,"text":337},{"id":347,"depth":139,"text":348},{"id":368,"depth":139,"text":369},"Start training runs, batch jobs and evaluations without managing a machine.","md",{},true,"\u002Frun-jobs\u002Fsubmit",{"title":5,"description":401},"run-jobs\u002Fsubmit","0hwEFMv8GDVlI2OeVayr_emb4_YsSY5HhXMFIPb-lQQ",[410,414],{"title":411,"path":412,"description":413},"Run Jobs overview","\u002Frun-jobs","Train, evaluate and process data on GPUs you pay for only while the work runs.",{"title":415,"path":378,"description":416},"Manage Run Jobs","Track your Run Jobs, read their output, and stop the ones you don't need.",1794932598300]