import{s as z,n as K,o as Q}from"../chunks/scheduler.6efaaf90.js";import{S as q,i as ee,e as s,s as a,c as T,h as te,a as m,d as l,b as i,f as D,g as w,j as x,k as Y,l as le,m as n,n as b,t as J,o as _,p as E}from"../chunks/index.eb3e1f0f.js";import{C as ne,H as ae,E as ie}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.bc356b46.js";import{C as X}from"../chunks/CodeBlock.1ecb727a.js";function oe(V){let o,C,y,k,r,W,p,Z,d,j=`If the model you wish to serve is behind gated access or resides in a private model repository on Hugging Face Hub,
you will need to have access to the model to serve it.`,U,f,R="Once you have confirmed that you have access to the model:",S,u,O='<li>Navigate to your account’s <a href="https://huggingface.co/settings/tokens" rel="nofollow">Profile | Settings | Access Tokens page</a>.</li> <li>Generate and copy a read token.</li>',F,c,A="If you’re the CLI, set the <code>HF_TOKEN</code> environment variable. For example:",G,g,H,$,B="Alternatively, you can provide the token when deploying the model with Docker:",N,v,I,h,L,M,P;return r=new ne({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),p=new ae({props:{title:"Serving private and gated models",local:"serving-private-and-gated-models",headingTag:"h1"}}),g=new X({props:{code:"ZXhwb3J0JTIwSEZfVE9LRU4lM0QlM0NZT1VSJTIwUkVBRCUyMFRPS0VOJTNF",highlighted:"export HF_TOKEN=&lt;YOUR READ TOKEN&gt;",wrap:!1}}),v=new X({props:{code:"bW9kZWwlM0QlM0N5b3VyJTIwcHJpdmF0ZSUyMG1vZGVsJTNFJTBBdm9sdW1lJTNEJTI0UFdEJTJGZGF0YSUwQXRva2VuJTNEJTNDeW91ciUyMGNsaSUyMEh1Z2dpbmclMjBGYWNlJTIwSHViJTIwdG9rZW4lM0UlMEElMEFkb2NrZXIlMjBydW4lMjAtLWdwdXMlMjBhbGwlMjAtZSUyMEhGX1RPS0VOJTNEJTI0dG9rZW4lMjAtcCUyMDgwODAlM0E4MCUyMC12JTIwJTI0dm9sdW1lJTNBJTJGZGF0YSUyMC0tcHVsbCUyMGFsd2F5cyUyMGdoY3IuaW8lMkZodWdnaW5nZmFjZSUyRnRleHQtZW1iZWRkaW5ncy1pbmZlcmVuY2UlM0ExLjglMjAtLW1vZGVsLWlkJTIwJTI0bW9kZWw=",highlighted:`model=&lt;your private model&gt;
volume=$PWD/data
token=&lt;your cli Hugging Face Hub token&gt;

docker run --gpus all -e HF_TOKEN=$token -p 8080:80 -v $volume:/data --pull always ghcr.io/huggingface/text-embeddings-inference:1.8 --model-id $model`,wrap:!1}}),h=new ie({props:{source:"https://github.com/huggingface/text-embeddings-inference/blob/main/docs/source/en/private_models.md"}}),{c(){o=s("meta"),C=a(),y=s("p"),k=a(),T(r.$$.fragment),W=a(),T(p.$$.fragment),Z=a(),d=s("p"),d.textContent=j,U=a(),f=s("p"),f.textContent=R,S=a(),u=s("ul"),u.innerHTML=O,F=a(),c=s("p"),c.innerHTML=A,G=a(),T(g.$$.fragment),H=a(),$=s("p"),$.textContent=B,N=a(),T(v.$$.fragment),I=a(),T(h.$$.fragment),L=a(),M=s("p"),this.h()},l(e){const t=te("svelte-u9bgzb",document.head);o=m(t,"META",{name:!0,content:!0}),t.forEach(l),C=i(e),y=m(e,"P",{}),D(y).forEach(l),k=i(e),w(r.$$.fragment,e),W=i(e),w(p.$$.fragment,e),Z=i(e),d=m(e,"P",{"data-svelte-h":!0}),x(d)!=="svelte-ykxg5y"&&(d.textContent=j),U=i(e),f=m(e,"P",{"data-svelte-h":!0}),x(f)!=="svelte-1a3ft6a"&&(f.textContent=R),S=i(e),u=m(e,"UL",{"data-svelte-h":!0}),x(u)!=="svelte-12xdpuz"&&(u.innerHTML=O),F=i(e),c=m(e,"P",{"data-svelte-h":!0}),x(c)!=="svelte-3kvze5"&&(c.innerHTML=A),G=i(e),w(g.$$.fragment,e),H=i(e),$=m(e,"P",{"data-svelte-h":!0}),x($)!=="svelte-sfmplj"&&($.textContent=B),N=i(e),w(v.$$.fragment,e),I=i(e),w(h.$$.fragment,e),L=i(e),M=m(e,"P",{}),D(M).forEach(l),this.h()},h(){Y(o,"name","hf:doc:metadata"),Y(o,"content",se)},m(e,t){le(document.head,o),n(e,C,t),n(e,y,t),n(e,k,t),b(r,e,t),n(e,W,t),b(p,e,t),n(e,Z,t),n(e,d,t),n(e,U,t),n(e,f,t),n(e,S,t),n(e,u,t),n(e,F,t),n(e,c,t),n(e,G,t),b(g,e,t),n(e,H,t),n(e,$,t),n(e,N,t),b(v,e,t),n(e,I,t),b(h,e,t),n(e,L,t),n(e,M,t),P=!0},p:K,i(e){P||(J(r.$$.fragment,e),J(p.$$.fragment,e),J(g.$$.fragment,e),J(v.$$.fragment,e),J(h.$$.fragment,e),P=!0)},o(e){_(r.$$.fragment,e),_(p.$$.fragment,e),_(g.$$.fragment,e),_(v.$$.fragment,e),_(h.$$.fragment,e),P=!1},d(e){e&&(l(C),l(y),l(k),l(W),l(Z),l(d),l(U),l(f),l(S),l(u),l(F),l(c),l(G),l(H),l($),l(N),l(I),l(L),l(M)),l(o),E(r,e),E(p,e),E(g,e),E(v,e),E(h,e)}}}const se='{"title":"Serving private and gated models","local":"serving-private-and-gated-models","sections":[],"depth":1}';function me(V){return Q(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ue extends q{constructor(o){super(),ee(this,o,me,oe,z,{})}}export{ue as component};
