import{s as ce,o as ge,n as he}from"../chunks/scheduler.6efaaf90.js";import{S as de,i as we,e as w,s,c as r,h as ye,a as y,d as n,b as i,f as oe,g as p,j as Y,k as ue,l as Te,m as l,n as f,t as $,o,p as u}from"../chunks/index.eb3e1f0f.js";import{T as be}from"../chunks/Tip.292c2c3d.js";import{C as xe,H as R,E as Me}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.bc356b46.js";import{C as N}from"../chunks/CodeBlock.1ecb727a.js";function Ie(V){let m,b="In some cases, you might also need the OpenSSL libraries and gcc installed. On Linux machines, run the following command:",d,c,g;return c=new N({props:{code:"c3VkbyUyMGFwdC1nZXQlMjBpbnN0YWxsJTIwbGlic3NsLWRldiUyMGdjYyUyMC15",highlighted:"sudo apt-get install libssl-dev gcc -y",wrap:!1}}),{c(){m=w("p"),m.textContent=b,d=s(),r(c.$$.fragment)},l(a){m=y(a,"P",{"data-svelte-h":!0}),Y(m)!=="svelte-4gm412"&&(m.textContent=b),d=i(a),p(c.$$.fragment,a)},m(a,h){l(a,m,h),l(a,d,h),f(c,a,h),g=!0},p:he,i(a){g||($(c.$$.fragment,a),g=!0)},o(a){o(c.$$.fragment,a),g=!1},d(a){a&&(n(m),n(d)),u(c,a)}}}function Ce(V){let m,b,d,c,g,a,h,j,x,ae="You can install <code>text-embeddings-inference</code> locally to run it on your own machine. Here are the step-by-step instructions for installation:",F,M,W,I,me='<a href="https://rustup.rs/" rel="nofollow">Install Rust</a> on your machine by run the following in your terminal, then following the instructions:',B,C,X,J,z,_,re="Depending on your machine’s architecture, run one of the following commands:",A,L,O,v,D,k,Q,S,q,U,K,E,pe="Once the installation is successfully complete, you can launch Text Embeddings Inference on CPU with the following command:",ee,G,te,T,ne,P,fe=`Now you are ready to use <code>text-embeddings-inference</code> locally on your machine.
If you want to run TEI locally with a GPU, check out the <a href="local_gpu">Using TEI locally with GPU</a> page.`,le,H,se,Z,ie;return g=new xe({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),h=new R({props:{title:"Using TEI locally with CPU",local:"using-tei-locally-with-cpu",headingTag:"h1"}}),M=new R({props:{title:"Step 1: Install Rust",local:"step-1-install-rust",headingTag:"h2"}}),C=new N({props:{code:"Y3VybCUyMC0tcHJvdG8lMjAnJTNEaHR0cHMnJTIwLS10bHN2MS4yJTIwLXNTZiUyMGh0dHBzJTNBJTJGJTJGc2gucnVzdHVwLnJzJTIwJTdDJTIwc2g=",highlighted:"curl --proto &#x27;=https&#x27; --tlsv1.2 -sSf https://sh.rustup.rs | sh",wrap:!1}}),J=new R({props:{title:"Step 2: Install necessary packages",local:"step-2-install-necessary-packages",headingTag:"h2"}}),L=new R({props:{title:"For x86 Machines",local:"for-x86-machines",headingTag:"h3"}}),v=new N({props:{code:"Y2FyZ28lMjBpbnN0YWxsJTIwLS1wYXRoJTIwcm91dGVyJTIwLUYlMjBta2w=",highlighted:"cargo install --path router -F mkl",wrap:!1}}),k=new R({props:{title:"For M1 or M2 Machines",local:"for-m1-or-m2-machines",headingTag:"h3"}}),S=new N({props:{code:"Y2FyZ28lMjBpbnN0YWxsJTIwLS1wYXRoJTIwcm91dGVyJTIwLUYlMjBtZXRhbA==",highlighted:"cargo install --path router -F metal",wrap:!1}}),U=new R({props:{title:"Step 3: Launch Text Embeddings Inference",local:"step-3-launch-text-embeddings-inference",headingTag:"h2"}}),G=new N({props:{code:"bW9kZWwlM0RRd2VuJTJGUXdlbjMtRW1iZWRkaW5nLTAuNkIlMEElMEF0ZXh0LWVtYmVkZGluZ3Mtcm91dGVyJTIwLS1tb2RlbC1pZCUyMCUyNG1vZGVsJTIwLS1wb3J0JTIwODA4MA==",highlighted:`model=Qwen/Qwen3-Embedding-0.6B

text-embeddings-router --model-id $model --port 8080`,wrap:!1}}),T=new be({props:{$$slots:{default:[Ie]},$$scope:{ctx:V}}}),H=new Me({props:{source:"https://github.com/huggingface/text-embeddings-inference/blob/main/docs/source/en/local_cpu.md"}}),{c(){m=w("meta"),b=s(),d=w("p"),c=s(),r(g.$$.fragment),a=s(),r(h.$$.fragment),j=s(),x=w("p"),x.innerHTML=ae,F=s(),r(M.$$.fragment),W=s(),I=w("p"),I.innerHTML=me,B=s(),r(C.$$.fragment),X=s(),r(J.$$.fragment),z=s(),_=w("p"),_.textContent=re,A=s(),r(L.$$.fragment),O=s(),r(v.$$.fragment),D=s(),r(k.$$.fragment),Q=s(),r(S.$$.fragment),q=s(),r(U.$$.fragment),K=s(),E=w("p"),E.textContent=pe,ee=s(),r(G.$$.fragment),te=s(),r(T.$$.fragment),ne=s(),P=w("p"),P.innerHTML=fe,le=s(),r(H.$$.fragment),se=s(),Z=w("p"),this.h()},l(e){const t=ye("svelte-u9bgzb",document.head);m=y(t,"META",{name:!0,content:!0}),t.forEach(n),b=i(e),d=y(e,"P",{}),oe(d).forEach(n),c=i(e),p(g.$$.fragment,e),a=i(e),p(h.$$.fragment,e),j=i(e),x=y(e,"P",{"data-svelte-h":!0}),Y(x)!=="svelte-1shqo2r"&&(x.innerHTML=ae),F=i(e),p(M.$$.fragment,e),W=i(e),I=y(e,"P",{"data-svelte-h":!0}),Y(I)!=="svelte-2fjw7p"&&(I.innerHTML=me),B=i(e),p(C.$$.fragment,e),X=i(e),p(J.$$.fragment,e),z=i(e),_=y(e,"P",{"data-svelte-h":!0}),Y(_)!=="svelte-1gbvryw"&&(_.textContent=re),A=i(e),p(L.$$.fragment,e),O=i(e),p(v.$$.fragment,e),D=i(e),p(k.$$.fragment,e),Q=i(e),p(S.$$.fragment,e),q=i(e),p(U.$$.fragment,e),K=i(e),E=y(e,"P",{"data-svelte-h":!0}),Y(E)!=="svelte-kzx1ig"&&(E.textContent=pe),ee=i(e),p(G.$$.fragment,e),te=i(e),p(T.$$.fragment,e),ne=i(e),P=y(e,"P",{"data-svelte-h":!0}),Y(P)!=="svelte-1n6vc8o"&&(P.innerHTML=fe),le=i(e),p(H.$$.fragment,e),se=i(e),Z=y(e,"P",{}),oe(Z).forEach(n),this.h()},h(){ue(m,"name","hf:doc:metadata"),ue(m,"content",Je)},m(e,t){Te(document.head,m),l(e,b,t),l(e,d,t),l(e,c,t),f(g,e,t),l(e,a,t),f(h,e,t),l(e,j,t),l(e,x,t),l(e,F,t),f(M,e,t),l(e,W,t),l(e,I,t),l(e,B,t),f(C,e,t),l(e,X,t),f(J,e,t),l(e,z,t),l(e,_,t),l(e,A,t),f(L,e,t),l(e,O,t),f(v,e,t),l(e,D,t),f(k,e,t),l(e,Q,t),f(S,e,t),l(e,q,t),f(U,e,t),l(e,K,t),l(e,E,t),l(e,ee,t),f(G,e,t),l(e,te,t),f(T,e,t),l(e,ne,t),l(e,P,t),l(e,le,t),f(H,e,t),l(e,se,t),l(e,Z,t),ie=!0},p(e,[t]){const $e={};t&2&&($e.$$scope={dirty:t,ctx:e}),T.$set($e)},i(e){ie||($(g.$$.fragment,e),$(h.$$.fragment,e),$(M.$$.fragment,e),$(C.$$.fragment,e),$(J.$$.fragment,e),$(L.$$.fragment,e),$(v.$$.fragment,e),$(k.$$.fragment,e),$(S.$$.fragment,e),$(U.$$.fragment,e),$(G.$$.fragment,e),$(T.$$.fragment,e),$(H.$$.fragment,e),ie=!0)},o(e){o(g.$$.fragment,e),o(h.$$.fragment,e),o(M.$$.fragment,e),o(C.$$.fragment,e),o(J.$$.fragment,e),o(L.$$.fragment,e),o(v.$$.fragment,e),o(k.$$.fragment,e),o(S.$$.fragment,e),o(U.$$.fragment,e),o(G.$$.fragment,e),o(T.$$.fragment,e),o(H.$$.fragment,e),ie=!1},d(e){e&&(n(b),n(d),n(c),n(a),n(j),n(x),n(F),n(W),n(I),n(B),n(X),n(z),n(_),n(A),n(O),n(D),n(Q),n(q),n(K),n(E),n(ee),n(te),n(ne),n(P),n(le),n(se),n(Z)),n(m),u(g,e),u(h,e),u(M,e),u(C,e),u(J,e),u(L,e),u(v,e),u(k,e),u(S,e),u(U,e),u(G,e),u(T,e),u(H,e)}}}const Je='{"title":"Using TEI locally with CPU","local":"using-tei-locally-with-cpu","sections":[{"title":"Step 1: Install Rust","local":"step-1-install-rust","sections":[],"depth":2},{"title":"Step 2: Install necessary packages","local":"step-2-install-necessary-packages","sections":[{"title":"For x86 Machines","local":"for-x86-machines","sections":[],"depth":3},{"title":"For M1 or M2 Machines","local":"for-m1-or-m2-machines","sections":[],"depth":3}],"depth":2},{"title":"Step 3: Launch Text Embeddings Inference","local":"step-3-launch-text-embeddings-inference","sections":[],"depth":2}],"depth":1}';function _e(V){return ge(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ee extends de{constructor(m){super(),we(this,m,_e,Ce,ce,{})}}export{Ee as component};
