This topic describes how to configure Hugging Face SDK to work with Artifactory.
To configure the Hugging Face SDK to work with Artifactory:
Go to the JFrog Platform Artifacts page, select your Hugging Face repository, and click Set Me Up.
To create a Hugging Face token, enter your JFrog Platform password, and click Generate Token & Create Instructions.
Connect your HuggingFaceML repository to the Hugging Face SDK in Artifactory using the following command:
export HF_HUB_ETAG_TIMEOUT=86400 export HF_HUB_DOWNLOAD_TIMEOUT=86400 export HF_ENDPOINT=https://<YOUR_JFROG_DOMAIN>/artifactory/api/huggingfaceml/<REPOSITORY_NAME>
For example:
export HF_HUB_ETAG_TIMEOUT=86400 export HF_HUB_DOWNLOAD_TIMEOUT=86400 export HF_ENDPOINT=https://john.jfrog.io/artifactory/api/huggingfaceml/john_HF_local
Authenticate the Hugging Face client with Artifactory by running the following command:
export HF_TOKEN=<IDENTITY_TOKEN>
For example:
export HF_TOKEN=ZdtdKiLgbgprmkLrUXyjD0uCGI!HN7ZywzZ55JCAwpHhTZsOr7Uv-L7oeCKZ3y