[{"data":1,"prerenderedAt":319},["ShallowReactive",2],{"page-\u002Ftemplates\u002Fcustom-images":3,"surround-\u002Ftemplates\u002Fcustom-images":311},{"id":4,"title":5,"body":6,"description":303,"extension":304,"meta":305,"navigation":306,"path":307,"seo":308,"stem":309,"__hash__":310},"docs\u002Ftemplates\u002Fcustom-images.md","Custom images",{"type":7,"value":8,"toc":294},"minimark",[9,13,18,119,123,161,168,172,184,188,199,203,210,214,217,225,231,264,267,271,290],[10,11,12],"p",{},"This page covers running your own image, what the image must provide, and how the start command, environment variables and secrets reach it.",[14,15,17],"h2",{"id":16},"run-your-own-image","Run your own image",[19,20,22,39],"tabs",{"sync":21},"interface",[23,24,26],"tabs-item",{"label":25},"Console",[10,27,28,29,33,34,38],{},"On the deploy page, ",[30,31,32],"strong",{},"Set overrides"," takes the image reference, for example ",[35,36,37],"code",{},"ghcr.io\u002Facme\u002Ftrainer:1.4",", and the registry credential to pull it with.",[23,40,42,112],{"label":41},"CLI",[43,44,49],"pre",{"className":45,"code":46,"language":47,"meta":48,"style":48},"language-bash shiki shiki-themes github-dark-default","featherless-cloud instance create --name trainer --image ghcr.io\u002Facme\u002Ftrainer:1.4 --gpu-count 1\nfeatherless-cloud exec --image ghcr.io\u002Facme\u002Ftrainer:1.4 --gpu-count 1 -- python train.py\n","bash","",[35,50,51,86],{"__ignoreMap":48},[52,53,56,60,64,67,71,74,77,80,83],"span",{"class":54,"line":55},"line",1,[52,57,59],{"class":58},"sQhOw","featherless-cloud",[52,61,63],{"class":62},"s9uIt"," instance",[52,65,66],{"class":62}," create",[52,68,70],{"class":69},"sFSAA"," --name",[52,72,73],{"class":62}," trainer",[52,75,76],{"class":69}," --image",[52,78,79],{"class":62}," ghcr.io\u002Facme\u002Ftrainer:1.4",[52,81,82],{"class":69}," --gpu-count",[52,84,85],{"class":69}," 1\n",[52,87,89,91,94,96,98,100,103,106,109],{"class":54,"line":88},2,[52,90,59],{"class":58},[52,92,93],{"class":62}," exec",[52,95,76],{"class":69},[52,97,79],{"class":62},[52,99,82],{"class":69},[52,101,102],{"class":69}," 1",[52,104,105],{"class":69}," --",[52,107,108],{"class":62}," python",[52,110,111],{"class":62}," train.py\n",[10,113,114,115,118],{},"Add ",[35,116,117],{},"--registry \u003Cname>"," to choose a registry credential for a private image.",[14,120,122],{"id":121},"check-that-your-image-will-run","Check that your image will run",[124,125,126,134,137,140],"ul",{},[127,128,129,130,133],"li",{},"The image must support ",[35,131,132],{},"linux\u002Famd64",".",[127,135,136],{},"It must be in a registry reachable over HTTPS, such as Docker Hub, GitHub Container Registry or your own.",[127,138,139],{},"GPU images need the libraries for the GPU you choose: ROCm for AMD GPUs, CUDA for NVIDIA GPUs.",[127,141,142,143,146,147,146,150,146,153,156,157,160],{},"For SSH, the image must run as root and include an SSH server, or a package manager (",[35,144,145],{},"apt",", ",[35,148,149],{},"dnf",[35,151,152],{},"yum",[35,154,155],{},"apk"," or ",[35,158,159],{},"zypper",") that can install one. Without it, use the browser terminal.",[10,162,163,164,167],{},"A tag can move to a new build between deploys. Deploy by digest (",[35,165,166],{},"image@sha256:…",") when every run must use the same build.",[14,169,171],{"id":170},"pull-from-a-private-registry","Pull from a private registry",[10,173,174,179,180,183],{},[175,176,178],"a",{"href":177},"\u002Fget-started\u002Fcredentials#add-registry-credentials","Add registry credentials"," for the registry first. With ",[30,181,182],{},"Automatic",", the image is pulled without credentials when it's public, and otherwise with a credential for its registry that your organization has added.",[14,185,187],{"id":186},"set-the-start-command","Set the start command",[10,189,190,191,194,195,198],{},"The ",[30,192,193],{},"Start command"," replaces the image's default command. It's split on spaces and runs without a shell, so quotes and variables like ",[35,196,197],{},"$HOME"," are passed as written. To use shell features, put them in a script and run the script.",[14,200,202],{"id":201},"pass-environment-variables","Pass environment variables",[10,204,205,206,209],{},"Environment variables are passed to the container and shown on the instance's ",[30,207,208],{},"Details"," tab. Values you set override a template's values with the same name.",[14,211,213],{"id":212},"read-secrets-in-your-code","Read secrets in your code",[10,215,216],{},"Each secret is a read-only file in the container, not an environment variable:",[43,218,223],{"className":219,"code":221,"language":222,"meta":48},[220],"language-text","\u002Frun\u002Ffeatherless\u002Fsecrets\u002F\u003CNAME>\n","text",[35,224,221],{"__ignoreMap":48},[10,226,227,230],{},[35,228,229],{},"FEATHERLESS_SECRETS_PATH"," holds the folder's path. Read a secret where you need it:",[43,232,234],{"className":45,"code":233,"language":47,"meta":48,"style":48},"export HF_TOKEN=\"$(cat \"$FEATHERLESS_SECRETS_PATH\u002FHF_TOKEN\")\"\n",[35,235,236],{"__ignoreMap":48},[52,237,238,242,246,249,252,255,258,261],{"class":54,"line":55},[52,239,241],{"class":240},"suJrU","export",[52,243,245],{"class":244},"sZEs4"," HF_TOKEN",[52,247,248],{"class":240},"=",[52,250,251],{"class":62},"\"$(",[52,253,254],{"class":58},"cat",[52,256,257],{"class":62}," \"",[52,259,260],{"class":244},"$FEATHERLESS_SECRETS_PATH",[52,262,263],{"class":62},"\u002FHF_TOKEN\")\"\n",[10,265,266],{},"Secrets can't be changed after an instance is deployed.",[14,268,270],{"id":269},"next-steps","Next steps",[272,273,274,283],"card-group",{},[275,276,280],"card",{"icon":277,"title":278,"to":279},"i-lucide-box","Save it as a template","\u002Ftemplates\u002Fmanage",[10,281,282],{},"Reuse your image and settings.",[275,284,287],{"icon":285,"title":286,"to":177},"i-lucide-key-round","Registry credentials",[10,288,289],{},"Pull private images.",[291,292,293],"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 pre.shiki code .sFSAA, html code.shiki .sFSAA{--shiki-default:#79C0FF}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 .suJrU, html code.shiki .suJrU{--shiki-default:#FF7B72}html pre.shiki code .sZEs4, html code.shiki .sZEs4{--shiki-default:#E6EDF3}",{"title":48,"searchDepth":88,"depth":88,"links":295},[296,297,298,299,300,301,302],{"id":16,"depth":88,"text":17},{"id":121,"depth":88,"text":122},{"id":170,"depth":88,"text":171},{"id":186,"depth":88,"text":187},{"id":201,"depth":88,"text":202},{"id":212,"depth":88,"text":213},{"id":269,"depth":88,"text":270},"Bring your own container image, public or private.","md",{},true,"\u002Ftemplates\u002Fcustom-images",{"title":5,"description":303},"templates\u002Fcustom-images","kVqdidAk51bh84kC0S0aN13KRK2nc8PhO-wjw26vLfw",[312,315],{"title":313,"path":279,"description":314},"Manage templates","Save your launch settings once and deploy them again in one click, for you or your whole organization.",{"title":316,"path":317,"description":318},"Billing","\u002Faccount\u002Fbilling","Pay only for what runs, from prepaid credit.",1794932598317]