Buckets:

HuggingFaceDocBuilder's picture
download
raw
7.11 kB
import"../chunks/DsnmJJEf.js";import{i as f,h as A,C as v,H as s,a as l,E as N,s as b}from"../chunks/CyvF58-O.js";import{p as q,o as C,s as a,f as Y,a as y,b as E,c as k,n as _}from"../chunks/DfHjNWj2.js";const Z='{"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}';var Q=k('<meta name="hf:doc:metadata"/>'),G=k('<p></p> <!> <!> <p>Use <code>kernels lock</code> to generate a <code>kernels.lock</code> file that pins kernel dependencies to specific revisions.</p> <!> <!> <!> <ul><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></ul> <!> <p>Lock kernels in the current project:</p> <!> <p>Lock kernels in a specific project:</p> <!> <!> <p>Add your kernel dependencies to <code>pyproject.toml</code>:</p> <!> <p>The version can be:</p> <ul><li>A version number (e.g., <code>1</code>, <code>2</code>)</li></ul> <!> <p>The generated lock file contains:</p> <!> <!> <ol><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></ol> <!> <ul><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></ul> <!> <p></p>',1);function B(I,g){q(g,!1),C(()=>{new URLSearchParams(window.location.search).get("fw")}),f();var e=G();A("15eojf3",m=>{var w=Q();b(w,"content",Z),y(m,w)});var n=a(Y(e),2);v(n,{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"});var t=a(n,2);s(t,{title:"kernels lock",local:"kernels-lock",headingTag:"h1"});var o=a(t,4);s(o,{title:"Usage",local:"usage",headingTag:"h2"});var c=a(o,2);l(c,{code:"a2VybmVscyUyMGxvY2slMjAlM0Nwcm9qZWN0X2RpciUzRQ==",highlighted:"kernels lock &lt;project_dir&gt;",lang:"bash",wrap:!1});var p=a(c,2);s(p,{title:"What It Does",local:"what-it-does",headingTag:"h2"});var i=a(p,4);s(i,{title:"Examples",local:"examples",headingTag:"h2"});var r=a(i,4);l(r,{code:"a2VybmVscyUyMGxvY2slMjAu",highlighted:"kernels lock .",lang:"bash",wrap:!1});var d=a(r,4);l(d,{code:"a2VybmVscyUyMGxvY2slMjAlMkZwYXRoJTJGdG8lMkZteS1wcm9qZWN0",highlighted:"kernels lock /path/to/my-project",lang:"bash",wrap:!1});var h=a(d,2);s(h,{title:"pyproject.toml Format",local:"pyprojecttoml-format",headingTag:"h2"});var M=a(h,4);l(M,{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>`,lang:"toml",wrap:!1});var j=a(M,6);s(j,{title:"kernels.lock Format",local:"kernelslock-format",headingTag:"h2"});var u=a(j,4);l(u,{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>`,lang:"json",wrap:!1});var T=a(u,2);s(T,{title:"Workflow",local:"workflow",headingTag:"h2"});var J=a(T,4);s(J,{title:"See Also",local:"see-also",headingTag:"h2"});var U=a(J,4);N(U,{source:"https://github.com/huggingface/kernels/blob/main/docs/source/cli-lock.md"}),_(2),y(I,e),E()}export{B as component};

Xet Storage Details

Size:
7.11 kB
·
Xet hash:
1da9c57b9e6a24c55b2e52422d23a3260a37aa711c749ae0b7fa808a0c7b1d7e

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.