Buckets:
| import{s as G,n as R,o as Z}from"../chunks/scheduler.389d799c.js";import{S as K,i as X,g as l,s,r as S,A as Y,h as r,f as n,c as o,j as Q,u as W,x as w,k as V,y as ee,a as i,v as A,d as U,t as j,w as z}from"../chunks/index.8f81d18f.js";import{C as te}from"../chunks/CodeBlock.c0898180.js";import{H as ne,E as ie}from"../chunks/getInferenceSnippets.8efa8e08.js";function se(F){let a,_,$,y,d,v,c,I="Inference Endpoints’ base image includes all required libraries to run inference on Transformers models, but it also supports custom dependencies. This is useful if you want to:",T,m,J='<li><a href="/docs/inference-endpoints/guides/custom_handler">customize your inference pipeline</a> and need additional Python dependencies</li> <li>run a model which requires special dependencies like the newest or a fixed version of a library (for example, <code>tapas</code> (<code>torch-scatter</code>)).</li>',H,u,B='To add custom dependencies, add a <code>requirements.txt</code> <a href="https://huggingface.co/philschmid/distilbert-onnx-banking77/blob/main/requirements.txt" rel="nofollow">file</a> with the Python dependencies you want to install in your model repository on the Hugging Face Hub. When your Endpoint and Image artifacts are created, Inference Endpoints checks if the model repository contains a <code>requirements.txt</code> file and installs the dependencies listed within.',M,p,L,f,D="Check out the <code>requirements.txt</code> files in the following model repositories for examples:",k,h,N='<li><a href="https://huggingface.co/philschmid/distilbert-onnx-banking77/blob/main/requirements.txt" rel="nofollow">Optimum and onnxruntime</a></li> <li><a href="https://huggingface.co/philschmid/stable-diffusion-v1-4-endpoints/blob/main/requirements.txt" rel="nofollow">diffusers</a></li>',E,b,O='For more information, take a look at how you can create and install dependencies when you <a href="/docs/inference-endpoints/guides/custom_container">use your own custom container</a> for inference.',C,x,P,g,q;return d=new ne({props:{title:"Add custom Dependencies",local:"add-custom-dependencies",headingTag:"h1"}}),p=new te({props:{code:"b3B0aW11bSU1Qm9ubnhydW50aW1lJTVEJTNEJTNEMS4yLjMlMEFta2wtaW5jbHVkZSUwQW1rbA==",highlighted:`optimum[onnxruntime]==1.2.3 | |
| mkl-include | |
| mkl`,wrap:!1}}),x=new ie({props:{source:"https://github.com/huggingface/hf-endpoints-documentation/blob/main/docs/source/guides/custom_dependencies.mdx"}}),{c(){a=l("meta"),_=s(),$=l("p"),y=s(),S(d.$$.fragment),v=s(),c=l("p"),c.textContent=I,T=s(),m=l("ul"),m.innerHTML=J,H=s(),u=l("p"),u.innerHTML=B,M=s(),S(p.$$.fragment),L=s(),f=l("p"),f.innerHTML=D,k=s(),h=l("ul"),h.innerHTML=N,E=s(),b=l("p"),b.innerHTML=O,C=s(),S(x.$$.fragment),P=s(),g=l("p"),this.h()},l(e){const t=Y("svelte-u9bgzb",document.head);a=r(t,"META",{name:!0,content:!0}),t.forEach(n),_=o(e),$=r(e,"P",{}),Q($).forEach(n),y=o(e),W(d.$$.fragment,e),v=o(e),c=r(e,"P",{"data-svelte-h":!0}),w(c)!=="svelte-1otnpic"&&(c.textContent=I),T=o(e),m=r(e,"UL",{"data-svelte-h":!0}),w(m)!=="svelte-uzwec3"&&(m.innerHTML=J),H=o(e),u=r(e,"P",{"data-svelte-h":!0}),w(u)!=="svelte-10pf3qn"&&(u.innerHTML=B),M=o(e),W(p.$$.fragment,e),L=o(e),f=r(e,"P",{"data-svelte-h":!0}),w(f)!=="svelte-d1f339"&&(f.innerHTML=D),k=o(e),h=r(e,"UL",{"data-svelte-h":!0}),w(h)!=="svelte-1x07diw"&&(h.innerHTML=N),E=o(e),b=r(e,"P",{"data-svelte-h":!0}),w(b)!=="svelte-19c75i9"&&(b.innerHTML=O),C=o(e),W(x.$$.fragment,e),P=o(e),g=r(e,"P",{}),Q(g).forEach(n),this.h()},h(){V(a,"name","hf:doc:metadata"),V(a,"content",oe)},m(e,t){ee(document.head,a),i(e,_,t),i(e,$,t),i(e,y,t),A(d,e,t),i(e,v,t),i(e,c,t),i(e,T,t),i(e,m,t),i(e,H,t),i(e,u,t),i(e,M,t),A(p,e,t),i(e,L,t),i(e,f,t),i(e,k,t),i(e,h,t),i(e,E,t),i(e,b,t),i(e,C,t),A(x,e,t),i(e,P,t),i(e,g,t),q=!0},p:R,i(e){q||(U(d.$$.fragment,e),U(p.$$.fragment,e),U(x.$$.fragment,e),q=!0)},o(e){j(d.$$.fragment,e),j(p.$$.fragment,e),j(x.$$.fragment,e),q=!1},d(e){e&&(n(_),n($),n(y),n(v),n(c),n(T),n(m),n(H),n(u),n(M),n(L),n(f),n(k),n(h),n(E),n(b),n(C),n(P),n(g)),n(a),z(d,e),z(p,e),z(x,e)}}}const oe='{"title":"Add custom Dependencies","local":"add-custom-dependencies","sections":[],"depth":1}';function ae(F){return Z(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class me extends K{constructor(a){super(),X(this,a,ae,se,G,{})}}export{me as component}; | |
Xet Storage Details
- Size:
- 4.32 kB
- Xet hash:
- a355fb629c08b0f3eddfd9fa805d8672fd116a7621081ccf95b2635655cdf075
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.