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:

  1. Navigate to SettingsRepositoryRepositories.

  2. Select Create repository.

  3. From the list of recipes, select huggingface (proxy).

  4. In the form that appears, complete the required fields:

  1. To download gated content from Hugging Face Hub, select the Authentication checkbox under HTTP section.

  2. Under Authentication type, select Preemptive Bearer Token.

  3. Enter the access token provided by Hugging Face.

  4. Select the HTTP request settings checkbox and set the Connection timeout to 120 seconds. Increase this value if network latency or large file sizes require a longer timeout.

  5. 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.

  6. 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.