Skip to content

Commit 055a953

Browse files
authored
Document the to-wheel subcommand (#149)
* Document the `to-wheel` subcommand * Capitalization
1 parent 692d5ad commit 055a953

File tree

2 files changed

+32
-6
lines changed

2 files changed

+32
-6
lines changed

docs/source/_toctree.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
- local: api/layers
2323
title: Layers
2424
- local: cli
25-
title: kernels CLI
25+
title: Kernels CLI
2626
title: API Reference
2727
- sections:
2828
- local: kernel-requirements

docs/source/cli.md

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,40 @@
22

33
## Main Functions
44

5+
### kernels to-wheel
6+
7+
We strongly recommend downloading kernels from the Hub using the `kernels`
8+
package, since this comes with large [benefits](index.md) over using Python
9+
wheels. That said, some projects may require deployment of kernels as
10+
wheels. The `kernels` utility provides a simple solution to this. You can
11+
convert any Hub kernel into a set of wheels with the `to-wheel` command:
12+
13+
```bash
14+
$ kernels to-wheel drbh/img2grey 1.1.2
15+
☸ img2grey-1.1.2+torch27cu128cxx11-cp39-abi3-manylinux_2_28_x86_64.whl
16+
☸ img2grey-1.1.2+torch26cu124cxx11-cp39-abi3-manylinux_2_28_x86_64.whl
17+
☸ img2grey-1.1.2+torch26cu126cxx11-cp39-abi3-manylinux_2_28_x86_64.whl
18+
☸ img2grey-1.1.2+torch27cu126cxx11-cp39-abi3-manylinux_2_28_x86_64.whl
19+
☸ img2grey-1.1.2+torch26cu126cxx98-cp39-abi3-manylinux_2_28_x86_64.whl
20+
☸ img2grey-1.1.2+torch27cu128cxx11-cp39-abi3-manylinux_2_28_aarch64.whl
21+
☸ img2grey-1.1.2+torch26cu126cxx98-cp39-abi3-manylinux_2_28_aarch64.whl
22+
☸ img2grey-1.1.2+torch27cu126cxx11-cp39-abi3-manylinux_2_28_aarch64.whl
23+
☸ img2grey-1.1.2+torch26cu126cxx11-cp39-abi3-manylinux_2_28_aarch64.whl
24+
☸ img2grey-1.1.2+torch26cu118cxx98-cp39-abi3-manylinux_2_28_x86_64.whl
25+
☸ img2grey-1.1.2+torch26cu124cxx98-cp39-abi3-manylinux_2_28_x86_64.whl
26+
☸ img2grey-1.1.2+torch26cu118cxx11-cp39-abi3-manylinux_2_28_x86_64.whl
27+
☸ img2grey-1.1.2+torch27cu118cxx11-cp39-abi3-manylinux_2_28_x86_64.whl
28+
```
29+
530
### kernels upload
631

732
Use `kernels upload <dir_containing_build> --repo_id="hub-username/kernel"` to upload
8-
your kernel builds to the Hub.
33+
your kernel builds to the Hub.
934

1035
**Notes**:
1136

12-
* This will take care of creating a repository on the Hub with the `repo_id` provided.
13-
* If a repo with the `repo_id` already exists and if it contains a `build` with the build variant
14-
being uploaded, it will attempt to delete the files existing under it.
15-
* Make sure to be authenticated (run `hf auth login` if not) to be able to perform uploads to the Hub.
37+
- This will take care of creating a repository on the Hub with the `repo_id` provided.
38+
- If a repo with the `repo_id` already exists and if it contains a `build` with the build variant
39+
being uploaded, it will attempt to delete the files existing under it.
40+
- Make sure to be authenticated (run `hf auth login` if not) to be able to perform uploads to the Hub.
41+

0 commit comments

Comments
 (0)