"Challenges in Deploying and Syncing a Hugging Face Space with GitHub Actions

Description: I have been working on deploying a machine learning application to Hugging Face Spaces using GitHub Actions. While setting up the workflow, I encountered several challenges, including:

  1. Issues with large files being rejected by Hugging Face Spaces due to file size limits.
  2. Errors related to Git LFS not being supported by Hugging Face.
  3. Syntax and configuration issues in the GitHub Actions workflow file.
  4. Repository not found errors when pushing to the Hugging Face Space.
  5. General troubleshooting for Docker-based Hugging Face Spaces.

Discussion Points:

  • Best practices for handling large files when deploying to Hugging Face Spaces.
  • How to properly configure GitHub Actions to sync with Hugging Face Spaces.
  • Alternatives to Git LFS for managing large assets.
  • Troubleshooting techniques for common deployment errors.
  • Suggestions for organizing dependencies and Docker configurations for Spaces.

Objective: To gather insights, suggestions, and best practices from the community for addressing these challenges and improving the deployment process.

[hugging face ](git clone Email Pii Classifier V2 - a Hugging Face Space by siddharth786)github link

1 Like

Best practices for handling large files when deploying to Hugging Face Spaces.

The cheapest option for this is to use a Dataset repository.

Alternatives to Git LFS for managing large assets.

Xet is now available. There is an issue with programs that depend on the old huggingface_hub library, but other than that, it is fast and efficient.

Errors related to Git LFS not being supported by Hugging Face.

git lfs is supported and I use it regularly, but in Windows environments in particular, it won’t work properly unless you first install git and git lfs from the installer. This is because there is an outdated version of git already installed…

Repository not found errors when pushing to the Hugging Face Space.

In many cases, tokens are not being passed to the private repository. This can often be resolved by using login().

General troubleshooting for Docker-based Hugging Face Spaces.

Searching forums and StackOverflow is also useful, but the official HF documentation is quite detailed and convenient.

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.