import{s as Ne,n as qe,o as _e}from"../chunks/scheduler.f3b1e791.js";import{S as Ee,i as Ye,e as u,s as n,c as p,h as Le,a as M,d as l,b as a,f as be,g as i,j as f,k as xe,l as Ze,m as s,n as o,t as c,o as m,p as r}from"../chunks/index.023a9934.js";import{C as Qe}from"../chunks/CopyLLMTxtMenu.ee636735.js";import{C as D}from"../chunks/CodeBlock.5aa52fca.js";import{H as $,E as Ge}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.9b009efe.js";function We(he){let j,H,z,S,T,V,w,X,h,de="Use <code>kernels lock</code> to generate a <code>kernels.lock</code> file that pins kernel dependencies to specific revisions.",F,d,R,J,O,k,P,y,Je="<li>Reads kernel dependencies from <code>pyproject.toml</code> under <code>[tool.kernels.dependencies]</code></li> <li>Resolves each kernel to its current revision SHA</li> <li>Writes a <code>kernels.lock</code> file with pinned versions and variant information</li>",K,I,ee,g,ke="Lock kernels in the current project:",te,U,le,C,ye="Lock kernels in a specific project:",se,A,ne,v,ae,b,Ie="Add your kernel dependencies to <code>pyproject.toml</code>:",pe,x,ie,N,ge="The version can be:",oe,q,Ue="<li>A version number (e.g., <code>1</code>, <code>2</code>)</li>",ce,_,me,E,Ce="The generated lock file contains:",re,Y,ue,L,Me,Z,Ae="<li>Add dependencies to <code>pyproject.toml</code></li> <li>Run <code>kernels lock .</code> to generate the lock file</li> <li>Commit both <code>pyproject.toml</code> and <code>kernels.lock</code></li> <li>Use <code>kernels download .</code> to install locked kernels</li>",fe,Q,je,G,ve='<li><a href="cli-download">kernels download</a> - Download locked kernels</li> <li><a href="cli-versions">kernels versions</a> - View available kernel versions</li>',$e,W,Te,B,we;return T=new Qe({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),w=new $({props:{title:"kernels lock",local:"kernels-lock",headingTag:"h1"}}),d=new $({props:{title:"Usage",local:"usage",headingTag:"h2"}}),J=new D({props:{code:"a2VybmVscyUyMGxvY2slMjAlM0Nwcm9qZWN0X2RpciUzRQ==",highlighted:"kernels lock &lt;project_dir&gt;",wrap:!1}}),k=new $({props:{title:"What It Does",local:"what-it-does",headingTag:"h2"}}),I=new $({props:{title:"Examples",local:"examples",headingTag:"h2"}}),U=new D({props:{code:"a2VybmVscyUyMGxvY2slMjAu",highlighted:"kernels lock .",wrap:!1}}),A=new D({props:{code:"a2VybmVscyUyMGxvY2slMjAlMkZwYXRoJTJGdG8lMkZteS1wcm9qZWN0",highlighted:"kernels lock /path/to/my-project",wrap:!1}}),v=new $({props:{title:"pyproject.toml Format",local:"pyprojecttoml-format",headingTag:"h2"}}),x=new D({props:{code:"JTVCdG9vbC5rZXJuZWxzLmRlcGVuZGVuY2llcyU1RCUwQSUyMmtlcm5lbHMtY29tbXVuaXR5JTJGYWN0aXZhdGlvbiUyMiUyMCUzRCUyMDE=",highlighted:`<span class="hljs-section">[tool.kernels.dependencies]</span>
<span class="hljs-attr">&quot;kernels-community/activation&quot;</span> = <span class="hljs-number">1</span>`,wrap:!1}}),_=new $({props:{title:"kernels.lock Format",local:"kernelslock-format",headingTag:"h2"}}),Y=new D({props:{code:"JTVCJTBBJTIwJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIycmVwb19pZCUyMiUzQSUyMCUyMmtlcm5lbHMtY29tbXVuaXR5JTJGYWN0aXZhdGlvbiUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMnNoYSUyMiUzQSUyMCUyMmVjZTI3N2Y5MDhiOTQ1MzExMjcyMmQ1ODRmZWU0YjU2OTZmMjFjNDklMjIlMkMlMEElMjAlMjAlMjAlMjAlMjJ2YXJpYW50cyUyMiUzQSUyMCU3QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMnRvcmNoMjEwLWN1MTI4LXg4Nl82NC13aW5kb3dzJTIyJTNBJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIyaGFzaCUyMiUzQSUyMCUyMnNoYTI1Ni1jYmYwODVlMWQyOTdkOTkwZDljYjA3NGZiNTA3OWZmNDhlOTY4MmM3MjlmNTNhMDg5OWEzNmI1MTY0YTZmYjQ1JTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIyaGFzaF90eXBlJTIyJTNBJTIwJTIyZ2l0X2xmc19jb25jYXQlMjIlMEElMjAlMjAlMjAlMjAlMjAlMjAlN0QlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMkYlMkYlMjAuLi4lMEElMjAlMjAlMjAlMjAlMjAlMjAlMjJ0b3JjaDI5LW1ldGFsLWFhcmNoNjQtZGFyd2luJTIyJTNBJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIyaGFzaCUyMiUzQSUyMCUyMnNoYTI1Ni05ZjY2NWI1NGE1MzI0NmE3ZDM2Mjc0MjJmOGEwZDQxZDc5NTZkYzU0MDkwNDNkYmQxNGM0ZWMwMzI3YWVhMzEwJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIyaGFzaF90eXBlJTIyJTNBJTIwJTIyZ2l0X2xmc19jb25jYXQlMjIlMEElMjAlMjAlMjAlMjAlMjAlMjAlN0QlMEElMjAlMjAlMjAlMjAlN0QlMEElMjAlMjAlN0QlMEElNUQ=",highlighted:`<span class="hljs-punctuation">[</span>
  <span class="hljs-punctuation">{</span>
    <span class="hljs-attr">&quot;repo_id&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;kernels-community/activation&quot;</span><span class="hljs-punctuation">,</span>
    <span class="hljs-attr">&quot;sha&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;ece277f908b9453112722d584fee4b5696f21c49&quot;</span><span class="hljs-punctuation">,</span>
    <span class="hljs-attr">&quot;variants&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
      <span class="hljs-attr">&quot;torch210-cu128-x86_64-windows&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
        <span class="hljs-attr">&quot;hash&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;sha256-cbf085e1d297d990d9cb074fb5079ff48e9682c729f53a0899a36b5164a6fb45&quot;</span><span class="hljs-punctuation">,</span>
        <span class="hljs-attr">&quot;hash_type&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;git_lfs_concat&quot;</span>
      <span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
      <span class="hljs-comment">// ...</span>
      <span class="hljs-attr">&quot;torch29-metal-aarch64-darwin&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
        <span class="hljs-attr">&quot;hash&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;sha256-9f665b54a53246a7d3627422f8a0d41d7956dc5409043dbd14c4ec0327aea310&quot;</span><span class="hljs-punctuation">,</span>
        <span class="hljs-attr">&quot;hash_type&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;git_lfs_concat&quot;</span>
      <span class="hljs-punctuation">}</span>
    <span class="hljs-punctuation">}</span>
  <span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">]</span>`,wrap:!1}}),L=new $({props:{title:"Workflow",local:"workflow",headingTag:"h2"}}),Q=new $({props:{title:"See Also",local:"see-also",headingTag:"h2"}}),W=new Ge({props:{source:"https://github.com/huggingface/kernels/blob/main/docs/source/cli-lock.md"}}),{c(){j=u("meta"),H=n(),z=u("p"),S=n(),p(T.$$.fragment),V=n(),p(w.$$.fragment),X=n(),h=u("p"),h.innerHTML=de,F=n(),p(d.$$.fragment),R=n(),p(J.$$.fragment),O=n(),p(k.$$.fragment),P=n(),y=u("ul"),y.innerHTML=Je,K=n(),p(I.$$.fragment),ee=n(),g=u("p"),g.textContent=ke,te=n(),p(U.$$.fragment),le=n(),C=u("p"),C.textContent=ye,se=n(),p(A.$$.fragment),ne=n(),p(v.$$.fragment),ae=n(),b=u("p"),b.innerHTML=Ie,pe=n(),p(x.$$.fragment),ie=n(),N=u("p"),N.textContent=ge,oe=n(),q=u("ul"),q.innerHTML=Ue,ce=n(),p(_.$$.fragment),me=n(),E=u("p"),E.textContent=Ce,re=n(),p(Y.$$.fragment),ue=n(),p(L.$$.fragment),Me=n(),Z=u("ol"),Z.innerHTML=Ae,fe=n(),p(Q.$$.fragment),je=n(),G=u("ul"),G.innerHTML=ve,$e=n(),p(W.$$.fragment),Te=n(),B=u("p"),this.h()},l(e){const t=Le("svelte-u9bgzb",document.head);j=M(t,"META",{name:!0,content:!0}),t.forEach(l),H=a(e),z=M(e,"P",{}),be(z).forEach(l),S=a(e),i(T.$$.fragment,e),V=a(e),i(w.$$.fragment,e),X=a(e),h=M(e,"P",{"data-svelte-h":!0}),f(h)!=="svelte-v209we"&&(h.innerHTML=de),F=a(e),i(d.$$.fragment,e),R=a(e),i(J.$$.fragment,e),O=a(e),i(k.$$.fragment,e),P=a(e),y=M(e,"UL",{"data-svelte-h":!0}),f(y)!=="svelte-kf7ia7"&&(y.innerHTML=Je),K=a(e),i(I.$$.fragment,e),ee=a(e),g=M(e,"P",{"data-svelte-h":!0}),f(g)!=="svelte-17kdlsx"&&(g.textContent=ke),te=a(e),i(U.$$.fragment,e),le=a(e),C=M(e,"P",{"data-svelte-h":!0}),f(C)!=="svelte-xabs16"&&(C.textContent=ye),se=a(e),i(A.$$.fragment,e),ne=a(e),i(v.$$.fragment,e),ae=a(e),b=M(e,"P",{"data-svelte-h":!0}),f(b)!=="svelte-1p5cy3g"&&(b.innerHTML=Ie),pe=a(e),i(x.$$.fragment,e),ie=a(e),N=M(e,"P",{"data-svelte-h":!0}),f(N)!=="svelte-126eipc"&&(N.textContent=ge),oe=a(e),q=M(e,"UL",{"data-svelte-h":!0}),f(q)!=="svelte-1okrsu1"&&(q.innerHTML=Ue),ce=a(e),i(_.$$.fragment,e),me=a(e),E=M(e,"P",{"data-svelte-h":!0}),f(E)!=="svelte-14y4to8"&&(E.textContent=Ce),re=a(e),i(Y.$$.fragment,e),ue=a(e),i(L.$$.fragment,e),Me=a(e),Z=M(e,"OL",{"data-svelte-h":!0}),f(Z)!=="svelte-h9b1dj"&&(Z.innerHTML=Ae),fe=a(e),i(Q.$$.fragment,e),je=a(e),G=M(e,"UL",{"data-svelte-h":!0}),f(G)!=="svelte-hfjeja"&&(G.innerHTML=ve),$e=a(e),i(W.$$.fragment,e),Te=a(e),B=M(e,"P",{}),be(B).forEach(l),this.h()},h(){xe(j,"name","hf:doc:metadata"),xe(j,"content",ze)},m(e,t){Ze(document.head,j),s(e,H,t),s(e,z,t),s(e,S,t),o(T,e,t),s(e,V,t),o(w,e,t),s(e,X,t),s(e,h,t),s(e,F,t),o(d,e,t),s(e,R,t),o(J,e,t),s(e,O,t),o(k,e,t),s(e,P,t),s(e,y,t),s(e,K,t),o(I,e,t),s(e,ee,t),s(e,g,t),s(e,te,t),o(U,e,t),s(e,le,t),s(e,C,t),s(e,se,t),o(A,e,t),s(e,ne,t),o(v,e,t),s(e,ae,t),s(e,b,t),s(e,pe,t),o(x,e,t),s(e,ie,t),s(e,N,t),s(e,oe,t),s(e,q,t),s(e,ce,t),o(_,e,t),s(e,me,t),s(e,E,t),s(e,re,t),o(Y,e,t),s(e,ue,t),o(L,e,t),s(e,Me,t),s(e,Z,t),s(e,fe,t),o(Q,e,t),s(e,je,t),s(e,G,t),s(e,$e,t),o(W,e,t),s(e,Te,t),s(e,B,t),we=!0},p:qe,i(e){we||(c(T.$$.fragment,e),c(w.$$.fragment,e),c(d.$$.fragment,e),c(J.$$.fragment,e),c(k.$$.fragment,e),c(I.$$.fragment,e),c(U.$$.fragment,e),c(A.$$.fragment,e),c(v.$$.fragment,e),c(x.$$.fragment,e),c(_.$$.fragment,e),c(Y.$$.fragment,e),c(L.$$.fragment,e),c(Q.$$.fragment,e),c(W.$$.fragment,e),we=!0)},o(e){m(T.$$.fragment,e),m(w.$$.fragment,e),m(d.$$.fragment,e),m(J.$$.fragment,e),m(k.$$.fragment,e),m(I.$$.fragment,e),m(U.$$.fragment,e),m(A.$$.fragment,e),m(v.$$.fragment,e),m(x.$$.fragment,e),m(_.$$.fragment,e),m(Y.$$.fragment,e),m(L.$$.fragment,e),m(Q.$$.fragment,e),m(W.$$.fragment,e),we=!1},d(e){e&&(l(H),l(z),l(S),l(V),l(X),l(h),l(F),l(R),l(O),l(P),l(y),l(K),l(ee),l(g),l(te),l(le),l(C),l(se),l(ne),l(ae),l(b),l(pe),l(ie),l(N),l(oe),l(q),l(ce),l(me),l(E),l(re),l(ue),l(Me),l(Z),l(fe),l(je),l(G),l($e),l(Te),l(B)),l(j),r(T,e),r(w,e),r(d,e),r(J,e),r(k,e),r(I,e),r(U,e),r(A,e),r(v,e),r(x,e),r(_,e),r(Y,e),r(L,e),r(Q,e),r(W,e)}}}const ze='{"title":"kernels lock","local":"kernels-lock","sections":[{"title":"Usage","local":"usage","sections":[],"depth":2},{"title":"What It Does","local":"what-it-does","sections":[],"depth":2},{"title":"Examples","local":"examples","sections":[],"depth":2},{"title":"pyproject.toml Format","local":"pyprojecttoml-format","sections":[],"depth":2},{"title":"kernels.lock Format","local":"kernelslock-format","sections":[],"depth":2},{"title":"Workflow","local":"workflow","sections":[],"depth":2},{"title":"See Also","local":"see-also","sections":[],"depth":2}],"depth":1}';function Be(he){return _e(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Fe extends Ee{constructor(j){super(),Ye(this,j,Be,We,Ne,{})}}export{Fe as component};
