[{"data":1,"prerenderedAt":405},["ShallowReactive",2],{"page-\u002Fstorage":3,"surround-\u002Fstorage":398},{"id":4,"title":5,"body":6,"description":390,"extension":391,"meta":392,"navigation":393,"path":394,"seo":395,"stem":396,"__hash__":397},"docs\u002Fstorage\u002Findex.md","Overview",{"type":7,"value":8,"toc":379},"minimark",[9,22,25,41,46,65,69,177,180,193,196,199,202,205,241,244,251,254,258,346,350,353,360,364],[10,11,12,13,17,18,21],"p",{},"Every instance and Run Job has a ",[14,15,16],"strong",{},"container disk",": its own temporary disk, erased when it stops. ",[14,19,20],{},"Network volumes"," are persistent storage you create separately and mount into instances and Run Jobs. Where you put a file decides whether it survives a stop and what you pay for it.",[10,23,24],{},"Use network volumes to:",[26,27,28,32,35,38],"ul",{},[29,30,31],"li",{},"keep datasets and model weights in one place and mount them into every instance and Run Job that needs them;",[29,33,34],{},"save checkpoints, so a training run that's interrupted or stopped can resume;",[29,36,37],{},"cache model downloads, so the next start skips the download;",[29,39,40],{},"share code and results between an instance you develop on and the Run Jobs you launch from it.",[42,43,45],"h2",{"id":44},"get-started","Get started",[47,48,49,57],"card-group",{},[50,51,54],"card",{"icon":52,"title":20,"to":53},"i-lucide-database","\u002Fstorage\u002Fnetwork-volumes",[10,55,56],{},"Create, mount, resize and delete volumes.",[50,58,62],{"icon":59,"title":60,"to":61},"i-lucide-folder-up","Transfer files","\u002Fstorage\u002Ftransfer-files",[10,63,64],{},"Upload and download files from the console or the CLI.",[42,66,68],{"id":67},"compare-storage-types","Compare storage types",[70,71,72,87],"table",{},[73,74,75],"thead",{},[76,77,78,81,84],"tr",{},[79,80],"th",{},[79,82,83],{},"Container disk",[79,85,86],{},"Network volume",[88,89,90,104,116,139,152,165],"tbody",{},[76,91,92,98,101],{},[93,94,95],"td",{},[14,96,97],{},"Survives a stop or restart",[93,99,100],{},"No",[93,102,103],{},"Yes",[76,105,106,111,113],{},[93,107,108],{},[14,109,110],{},"Survives deleting the instance",[93,112,100],{},[93,114,115],{},"Yes, until you delete the volume",[76,117,118,123,130],{},[93,119,120],{},[14,121,122],{},"Where it appears",[93,124,125,126],{},"The whole filesystem, including ",[127,128,129],"code",{},"\u002Fworkspace",[93,131,132,133,135,136],{},"The path you mount it at, such as ",[127,134,129],{}," or ",[127,137,138],{},"\u002Fdata",[76,140,141,146,149],{},[93,142,143],{},[14,144,145],{},"Size",[93,147,148],{},"20–2,000 GiB",[93,150,151],{},"Up to 10,240 GiB",[76,153,154,159,162],{},[93,155,156],{},[14,157,158],{},"Resize",[93,160,161],{},"When you edit the instance, which restarts it",[93,163,164],{},"Grow at any time, even while mounted; it can't shrink",[76,166,167,172,174],{},[93,168,169],{},[14,170,171],{},"Shared",[93,173,100],{},[93,175,176],{},"Several instances and Run Jobs can mount it at once",[42,178,83],{"id":179},"container-disk",[10,181,182,183,135,186,189,190,192],{},"The container disk holds the image, everything you install with ",[127,184,185],{},"pip",[127,187,188],{},"apt",", and every file outside a network volume's mount path, including ",[127,191,129],{}," when no volume is mounted there. Besides a stop, it's erased by a restart, including the one that applies an edit, and when a Run Job ends.",[10,194,195],{},"The terminal's welcome banner shows how much of the container disk is in use. Size it for the image, your packages and scratch files; anything you want to keep belongs on a volume.",[42,197,20],{"id":198},"network-volumes",[10,200,201],{},"A network volume lives outside any instance. Mount it when you deploy an instance or submit a Run Job; it can't be added to or removed from an existing instance. An instance or Run Job that mounts a volume runs in the volume's location.",[10,203,204],{},"Common ways to mount one:",[26,206,207,216,227],{},[29,208,209,215],{},[14,210,211,212,214],{},"At ",[127,213,129],{},":"," your whole working directory survives stops. This is the simplest setup for development.",[29,217,218,223,224,226],{},[14,219,211,220,222],{},[127,221,138],{}," or another path:"," datasets and models persist, while ",[127,225,129],{}," stays on the container disk for scratch work.",[29,228,229,232,233,236,237,240],{},[14,230,231],{},"For model downloads:"," set ",[127,234,235],{},"HF_HOME"," to a folder on the volume, such as ",[127,238,239],{},"\u002Fworkspace\u002Fhf",", so Hugging Face models download once and every later instance or Run Job reuses them.",[10,242,243],{},"Several instances and Run Jobs can read the same volume at once. Avoid writing the same file from two of them at the same time; give each its own output folder.",[10,245,246,247,250],{},"You can upload, download and organize a volume's files from the console or the CLI without starting an instance. See ",[248,249,60],"a",{"href":61},".",[10,252,253],{},"Deleting a volume erases its data and can't be undone. Keep a copy of data you can't recreate.",[42,255,257],{"id":256},"choose-where-to-keep-each-file","Choose where to keep each file",[70,259,260,273],{},[73,261,262],{},[76,263,264,267,270],{},[79,265,266],{},"File",[79,268,269],{},"Where",[79,271,272],{},"Why",[88,274,275,285,295,308,319,336],{},[76,276,277,280,282],{},[93,278,279],{},"Datasets and model weights",[93,281,86],{},[93,283,284],{},"Reused by every run without downloading again",[76,286,287,290,292],{},[93,288,289],{},"Checkpoints and results",[93,291,86],{},[93,293,294],{},"Survive stops, interruptions and deleting the instance",[76,296,297,300,305],{},[93,298,299],{},"Hugging Face cache",[93,301,302,303],{},"Network volume, through ",[127,304,235],{},[93,306,307],{},"Models download once",[76,309,310,313,316],{},[93,311,312],{},"Code",[93,314,315],{},"Network volume, or a Git repository you clone at start",[93,317,318],{},"Survives stops",[76,320,321,324,326],{},[93,322,323],{},"Python packages",[93,325,83],{},[93,327,328,329,332,333],{},"Reinstall after a stop; keep a ",[127,330,331],{},"requirements.txt"," on the volume so it's one command: ",[127,334,335],{},"pip install -r \u002Fworkspace\u002Frequirements.txt",[76,337,338,341,343],{},[93,339,340],{},"Temporary and scratch files",[93,342,83],{},[93,344,345],{},"Erased for you when the instance stops",[42,347,349],{"id":348},"how-storage-is-billed","How storage is billed",[10,351,352],{},"The container disk bills per second while the container runs, as part of the instance or Run Job, and stops billing when it stops.",[10,354,355,356,250],{},"Network volumes bill for their full capacity per second for as long as they exist, whether or not anything mounts them and how much of them is used. They keep billing when your balance reaches zero. Delete volumes you no longer need. See ",[248,357,359],{"href":358},"\u002Faccount\u002Fbilling","Billing",[42,361,363],{"id":362},"next-steps","Next steps",[47,365,366,371],{},[50,367,368],{"icon":52,"title":20,"to":53},[10,369,370],{},"Create a volume and mount it.",[50,372,376],{"icon":373,"title":374,"to":375},"i-lucide-notebook-pen","Develop in JupyterLab","\u002Fexamples\u002Fjupyterlab",[10,377,378],{},"Keep notebooks on a volume across stops.",{"title":380,"searchDepth":381,"depth":381,"links":382},"",2,[383,384,385,386,387,388,389],{"id":44,"depth":381,"text":45},{"id":67,"depth":381,"text":68},{"id":179,"depth":381,"text":83},{"id":198,"depth":381,"text":20},{"id":256,"depth":381,"text":257},{"id":348,"depth":381,"text":349},{"id":362,"depth":381,"text":363},"Keep datasets, models and checkpoints safe across instances and Run Jobs.","md",{},true,"\u002Fstorage",{"title":5,"description":390},"storage\u002Findex","io6dRrKUO-JsEgDJCLjq1nt4n7FguKdfV45Nj4MgzH8",[399,403],{"title":400,"path":401,"description":402},"Run Jobs troubleshooting","\u002Frun-jobs\u002Ftroubleshooting","Fix common Run Job problems, from jobs that never start to failed commands, time limits and missing output.",{"title":20,"path":53,"description":404},"Persistent, shareable storage for datasets, models and checkpoints.",1794932598308]