import{s as Ie,o as qe}from"../chunks/scheduler.d6170356.js";import{S as Ae,i as Ye,g as l,s as i,r as I,A as ze,h as r,f as s,c as n,j as Ee,u as q,x as o,k as he,y as Fe,a,v as A,d as Y,t as z,w as F,m as Ge,n as Ne}from"../chunks/index.fcd4cc08.js";import{T as je}from"../chunks/Tip.b09c67cf.js";import{H as N}from"../chunks/Heading.8660bd0e.js";function Re(j){let d;return{c(){d=Ge("WARNING: all data stored in the storage is lost when you delete it.")},l(u){d=Ne(u,"WARNING: all data stored in the storage is lost when you delete it.")},m(u,f){a(u,d,f)},d(u){u&&s(d)}}}function Ue(j){let d,u,f,R,g,U,h,me=`Every Space comes with a small amount of disk storage. This disk space is ephemeral, meaning its content will be lost if your Space restarts or is stopped.
If you need to persist data with a longer lifetime than the Space itself, you can:`,W,m,$e='<li><a href="#persistent-storage">Subscribe to a persistent storage upgrade</a></li> <li><a href="#dataset-storage">Use a dataset as a data store</a></li>',V,$,O,v,ve="You can upgrade your Space to have access to persistent disk space from the <strong>Settings</strong> tab.",J,p,we='<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-storage-settings.png"/> <img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/spaces-storage-settings-dark.png"/>',K,w,ye="You can choose the storage tier of your choice to access disk space that persists across restarts of your Space.",Q,y,_e="Persistent storage acts like traditional disk storage mounted on <code>/data</code>.",X,_,be="That means you can <code>read</code> and <code>write to</code> this storage from your Space as you would with a traditional hard drive or SSD.",Z,b,xe="Persistent disk space can be upgraded to a larger tier at will, though it cannot be downgraded to a smaller tier. If you wish to use a smaller persistent storage tier, you must delete your current (larger) storage first.",ee,x,Te="If you are using Hugging Face open source libraries, you can make your Space restart faster by setting the environment variable <code>HF_HOME</code> to <code>/data/.huggingface</code>. Libraries like <code>transformers</code>, <code>diffusers</code>, <code>datasets</code> and others use that environment variable to cache any assets downloaded from the Hugging Face Hub. Setting this variable to the persistent storage path will make sure that cached resources do not need to be re-downloaded when the Space is restarted.",te,c,se,T,ae,H,He="Here are the specifications for each of the different upgrade options:",ie,C,Ce="<thead><tr><th><strong>Tier</strong></th> <th><strong>Disk space</strong></th> <th><strong>Persistent</strong></th> <th><strong>Monthly Price</strong></th></tr></thead> <tbody><tr><td>Free tier</td> <td>50GB</td> <td>No (ephemeral)</td> <td>Free!</td></tr> <tr><td>Small</td> <td>20GB</td> <td>Yes</td> <td>$5</td></tr> <tr><td>Medium</td> <td>150 GB</td> <td>Yes</td> <td>$25</td></tr> <tr><td>Large</td> <td>1TB</td> <td>Yes</td> <td>$100</td></tr></tbody>",ne,P,le,L,Pe="Billing of Spaces is based on hardware usage and is computed by the minute: you get charged for every minute the Space runs on the requested hardware, regardless of whether the Space is used.",re,M,Le="Persistent storage upgrades are billed until deleted, even when the Space is not running and regardless of Space status or running state.",oe,S,Me='Additional information about billing can be found in the <a href="./billing">dedicated Hub-wide section</a>.',de,k,ue,B,Se='If you need to persist data that lives longer than your Space, you could use a <a href="./datasets">dataset repo</a>.',pe,D,ke='You can find an example of persistence <a href="https://huggingface.co/spaces/Wauplin/space_to_dataset_saver" rel="nofollow">here</a>, which uses the <a href="https://huggingface.co/docs/huggingface_hub/index" rel="nofollow"><code>huggingface_hub</code> library</a> for programmatically uploading files to a dataset repository. This Space example along with <a href="https://huggingface.co/docs/huggingface_hub/main/en/guides/upload#scheduled-uploads" rel="nofollow">this guide</a> will help you define which solution fits best your data type.',ce,E,Be=`Visit the <a href="https://huggingface.co/docs/datasets/index" rel="nofollow"><code>datasets</code> library</a> documentation and the <a href="https://huggingface.co/docs/huggingface_hub/index" rel="nofollow"><code>huggingface_hub</code> client library</a>
documentation for more information on how to programmatically interact with dataset repos.`,fe,G,ge;return g=new N({props:{title:"Disk usage on Spaces",local:"disk-usage-on-spaces",headingTag:"h1"}}),$=new N({props:{title:"Persistent storage",local:"persistent-storage",headingTag:"h2"}}),c=new je({props:{warning:!0,$$slots:{default:[Re]},$$scope:{ctx:j}}}),T=new N({props:{title:"Persistent storage specs",local:"persistent-storage-specs",headingTag:"h3"}}),P=new N({props:{title:"Billing",local:"billing",headingTag:"h3"}}),k=new N({props:{title:"Dataset storage",local:"dataset-storage",headingTag:"h2"}}),{c(){d=l("meta"),u=i(),f=l("p"),R=i(),I(g.$$.fragment),U=i(),h=l("p"),h.textContent=me,W=i(),m=l("ul"),m.innerHTML=$e,V=i(),I($.$$.fragment),O=i(),v=l("p"),v.innerHTML=ve,J=i(),p=l("div"),p.innerHTML=we,K=i(),w=l("p"),w.textContent=ye,Q=i(),y=l("p"),y.innerHTML=_e,X=i(),_=l("p"),_.innerHTML=be,Z=i(),b=l("p"),b.textContent=xe,ee=i(),x=l("p"),x.innerHTML=Te,te=i(),I(c.$$.fragment),se=i(),I(T.$$.fragment),ae=i(),H=l("p"),H.textContent=He,ie=i(),C=l("table"),C.innerHTML=Ce,ne=i(),I(P.$$.fragment),le=i(),L=l("p"),L.textContent=Pe,re=i(),M=l("p"),M.textContent=Le,oe=i(),S=l("p"),S.innerHTML=Me,de=i(),I(k.$$.fragment),ue=i(),B=l("p"),B.innerHTML=Se,pe=i(),D=l("p"),D.innerHTML=ke,ce=i(),E=l("p"),E.innerHTML=Be,fe=i(),G=l("p"),this.h()},l(e){const t=ze("svelte-u9bgzb",document.head);d=r(t,"META",{name:!0,content:!0}),t.forEach(s),u=n(e),f=r(e,"P",{}),Ee(f).forEach(s),R=n(e),q(g.$$.fragment,e),U=n(e),h=r(e,"P",{"data-svelte-h":!0}),o(h)!=="svelte-1uuqw4e"&&(h.textContent=me),W=n(e),m=r(e,"UL",{"data-svelte-h":!0}),o(m)!=="svelte-s2i5z5"&&(m.innerHTML=$e),V=n(e),q($.$$.fragment,e),O=n(e),v=r(e,"P",{"data-svelte-h":!0}),o(v)!=="svelte-zy6yio"&&(v.innerHTML=ve),J=n(e),p=r(e,"DIV",{class:!0,"data-svelte-h":!0}),o(p)!=="svelte-8b3ymf"&&(p.innerHTML=we),K=n(e),w=r(e,"P",{"data-svelte-h":!0}),o(w)!=="svelte-hysq70"&&(w.textContent=ye),Q=n(e),y=r(e,"P",{"data-svelte-h":!0}),o(y)!=="svelte-4tr3t2"&&(y.innerHTML=_e),X=n(e),_=r(e,"P",{"data-svelte-h":!0}),o(_)!=="svelte-9riflz"&&(_.innerHTML=be),Z=n(e),b=r(e,"P",{"data-svelte-h":!0}),o(b)!=="svelte-1w3m2y8"&&(b.textContent=xe),ee=n(e),x=r(e,"P",{"data-svelte-h":!0}),o(x)!=="svelte-1ftozrl"&&(x.innerHTML=Te),te=n(e),q(c.$$.fragment,e),se=n(e),q(T.$$.fragment,e),ae=n(e),H=r(e,"P",{"data-svelte-h":!0}),o(H)!=="svelte-1hjn13w"&&(H.textContent=He),ie=n(e),C=r(e,"TABLE",{"data-svelte-h":!0}),o(C)!=="svelte-ct41wt"&&(C.innerHTML=Ce),ne=n(e),q(P.$$.fragment,e),le=n(e),L=r(e,"P",{"data-svelte-h":!0}),o(L)!=="svelte-efv4d4"&&(L.textContent=Pe),re=n(e),M=r(e,"P",{"data-svelte-h":!0}),o(M)!=="svelte-76l176"&&(M.textContent=Le),oe=n(e),S=r(e,"P",{"data-svelte-h":!0}),o(S)!=="svelte-a71shw"&&(S.innerHTML=Me),de=n(e),q(k.$$.fragment,e),ue=n(e),B=r(e,"P",{"data-svelte-h":!0}),o(B)!=="svelte-hwrlcp"&&(B.innerHTML=Se),pe=n(e),D=r(e,"P",{"data-svelte-h":!0}),o(D)!=="svelte-lotqog"&&(D.innerHTML=ke),ce=n(e),E=r(e,"P",{"data-svelte-h":!0}),o(E)!=="svelte-1hubrq6"&&(E.innerHTML=Be),fe=n(e),G=r(e,"P",{}),Ee(G).forEach(s),this.h()},h(){he(d,"name","hf:doc:metadata"),he(d,"content",We),he(p,"class","flex justify-center")},m(e,t){Fe(document.head,d),a(e,u,t),a(e,f,t),a(e,R,t),A(g,e,t),a(e,U,t),a(e,h,t),a(e,W,t),a(e,m,t),a(e,V,t),A($,e,t),a(e,O,t),a(e,v,t),a(e,J,t),a(e,p,t),a(e,K,t),a(e,w,t),a(e,Q,t),a(e,y,t),a(e,X,t),a(e,_,t),a(e,Z,t),a(e,b,t),a(e,ee,t),a(e,x,t),a(e,te,t),A(c,e,t),a(e,se,t),A(T,e,t),a(e,ae,t),a(e,H,t),a(e,ie,t),a(e,C,t),a(e,ne,t),A(P,e,t),a(e,le,t),a(e,L,t),a(e,re,t),a(e,M,t),a(e,oe,t),a(e,S,t),a(e,de,t),A(k,e,t),a(e,ue,t),a(e,B,t),a(e,pe,t),a(e,D,t),a(e,ce,t),a(e,E,t),a(e,fe,t),a(e,G,t),ge=!0},p(e,[t]){const De={};t&2&&(De.$$scope={dirty:t,ctx:e}),c.$set(De)},i(e){ge||(Y(g.$$.fragment,e),Y($.$$.fragment,e),Y(c.$$.fragment,e),Y(T.$$.fragment,e),Y(P.$$.fragment,e),Y(k.$$.fragment,e),ge=!0)},o(e){z(g.$$.fragment,e),z($.$$.fragment,e),z(c.$$.fragment,e),z(T.$$.fragment,e),z(P.$$.fragment,e),z(k.$$.fragment,e),ge=!1},d(e){e&&(s(u),s(f),s(R),s(U),s(h),s(W),s(m),s(V),s(O),s(v),s(J),s(p),s(K),s(w),s(Q),s(y),s(X),s(_),s(Z),s(b),s(ee),s(x),s(te),s(se),s(ae),s(H),s(ie),s(C),s(ne),s(le),s(L),s(re),s(M),s(oe),s(S),s(de),s(ue),s(B),s(pe),s(D),s(ce),s(E),s(fe),s(G)),s(d),F(g,e),F($,e),F(c,e),F(T,e),F(P,e),F(k,e)}}}const We='{"title":"Disk usage on Spaces","local":"disk-usage-on-spaces","sections":[{"title":"Persistent storage","local":"persistent-storage","sections":[{"title":"Persistent storage specs","local":"persistent-storage-specs","sections":[],"depth":3},{"title":"Billing","local":"billing","sections":[],"depth":3}],"depth":2},{"title":"Dataset storage","local":"dataset-storage","sections":[],"depth":2}],"depth":1}';function Ve(j){return qe(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Xe extends Ae{constructor(d){super(),Ye(this,d,Ve,Ue,Ie,{})}}export{Xe as component};
