Create a Hugging Face Repository
Create a Hugging Face Repository
To download Hugging Face content through Nexus Repository, create a Hugging Face proxy repository. Check out Nexus Repository Management and Repository Types to learn more.
Hugging Face Proxy Repository
Use Nexus proxy repository when you want to download packages and centralize package caching of external dependencies. To learn more, check Proxy Repositories.
To create a new Hugging Face proxy repository, take the following steps:
Navigate to Settings → Repository→ Repositories.
Select Create repository.
From the list of recipes, select huggingface (proxy).
In the form that appears, complete the required fields:
- Repository Name, for example huggingface-proxy
- Remote storage URL for example https://huggingface.co
- Blob store
To download gated content from Hugging Face Hub, select the Authentication checkbox under HTTP section.
Under Authentication type, select Preemptive Bearer Token.
Enter the access token provided by Hugging Face.
Select the HTTP request settings checkbox and set the Connection timeout to
120seconds. Increase this value if network latency or large file sizes require a longer timeout.Complete the additional fields for configurations you wish to add for creating your repository. Available configurations differ by repository format and type. See Configurable Repository Fields for more details.
Select Create repository.
Note
Sonatype recommends using NFS, EFS, or Azure file storage for optimal performance. In testing, AWS S3 and Azure Blob stores exhibited performance issues that can affect download speeds.