|
1 | | -# Welcome to Pulp |
| 1 | +# Welcome to Pulp Hugging Face |
2 | 2 |
|
3 | | -The `` plugin extends pulpcore to support hosting packages. |
| 3 | +The `pulp_hugging_face` plugin extends pulpcore to support hosting and caching Hugging Face Hub content. |
4 | 4 | This plugin is a part of the Pulp Project, and assumes some familiarity with the |
5 | 5 | [pulpcore documentation](site:pulpcore/). |
6 | 6 |
|
7 | 7 | If you are just getting started, we recommend: |
8 | 8 |
|
9 | | -- [Getting Started with ](site:pulp_hugging_face/docs/tutorials/getting-started.md), |
10 | | - for a starting out with a common use case. |
| 9 | +- [Getting Started with Hugging Face](site:pulp_hugging_face/docs/user/tutorials/getting_started/), |
| 10 | + for setting up your first pull-through cache for Hugging Face models. |
| 11 | +- [Core Concepts](site:pulp_hugging_face/docs/user/learn/concepts/), |
| 12 | + to understand the plugin architecture and key terminology. |
11 | 13 |
|
| 14 | +## Features |
| 15 | + |
| 16 | +- **Pull-through Caching**: Automatically fetch and cache models, datasets, and spaces from Hugging Face Hub on first access |
| 17 | +- **Authentication Support**: Use Hugging Face tokens to access private repositories |
| 18 | +- **Full Compatibility**: Works seamlessly with `huggingface-cli`, transformers library, and other HF tools |
| 19 | +- **All Content Types**: Support for models, datasets, and spaces |
| 20 | +- **On-demand Downloads**: Reduce storage by only downloading content when requested |
| 21 | +- **Versioned Repositories**: Every operation creates a restorable snapshot |
| 22 | + |
| 23 | +## Documentation Sections |
| 24 | + |
| 25 | +### For Users |
| 26 | + |
| 27 | +- [User Guide](site:pulp_hugging_face/docs/user/) - Getting started and feature documentation |
| 28 | +- [Tutorials](site:pulp_hugging_face/docs/user/tutorials/getting_started/) - Step-by-step guides |
| 29 | +- [Guides](site:pulp_hugging_face/docs/user/guides/configuration/) - Detailed workflow documentation |
| 30 | + |
| 31 | +### For Administrators |
| 32 | + |
| 33 | +- [Admin Guide](site:pulp_hugging_face/docs/admin/) - Installation and configuration |
| 34 | + |
| 35 | +### For Developers |
| 36 | + |
| 37 | +- [Developer Guide](site:pulp_hugging_face/docs/dev/) - Contributing to the plugin |
| 38 | + |
| 39 | +## Quick Start |
| 40 | + |
| 41 | +1. Create a remote pointing to Hugging Face Hub: |
| 42 | + |
| 43 | +```bash |
| 44 | +curl -X POST https://pulp.example.com/pulp/api/v3/remotes/hugging_face/hugging-face/ \ |
| 45 | + -H "Content-Type: application/json" \ |
| 46 | + -u admin:password \ |
| 47 | + -d '{"name": "hf-remote", "url": "https://huggingface.co", "policy": "on_demand"}' |
| 48 | +``` |
| 49 | + |
| 50 | +2. Create a distribution for pull-through caching: |
| 51 | + |
| 52 | +```bash |
| 53 | +curl -X POST https://pulp.example.com/pulp/api/v3/distributions/hugging_face/hugging-face/ \ |
| 54 | + -H "Content-Type: application/json" \ |
| 55 | + -u admin:password \ |
| 56 | + -d '{"name": "hf-cache", "base_path": "huggingface", "remote": "<remote_href>"}' |
| 57 | +``` |
| 58 | + |
| 59 | +3. Access Hugging Face content through Pulp: |
| 60 | + |
| 61 | +```bash |
| 62 | +# Use with huggingface-cli |
| 63 | +export HF_ENDPOINT="https://pulp.example.com/pulp/content/huggingface" |
| 64 | +huggingface-cli download bert-base-uncased |
| 65 | +``` |
12 | 66 |
|
0 commit comments