Spaces:
Sleeping
Sleeping
π― Deployment Checklist
Use this checklist to ensure a smooth deployment to Hugging Face Spaces.
β Pre-Deployment
- Have a HuggingFace account (create at https://huggingface.co/join)
- Git is installed on your machine
- All files in
huggingface_deploymentfolder are present:-
app/folder with all subfolders -
main.py -
Dockerfile -
requirements.txt -
README.md(with YAML frontmatter) -
.dockerignore -
.gitignore -
LICENSE
-
β Create Space
- Go to https://huggingface.co/new-space
- Choose a name for your Space
- Select Docker as SDK
- Choose license: MIT
- Select visibility: Public or Private
- Click "Create Space"
β Upload Files
Option A: Web UI (Drag & Drop)
- Open your new Space page
- Click "Files" tab
- Drag and drop ALL files from
huggingface_deploymentfolder - Wait for upload to complete
Option B: Git (Recommended)
- Clone your Space:
git clone https://huggingface.co/spaces/USERNAME/SPACENAME - Copy all files from
huggingface_deploymentto cloned folder -
git add . -
git commit -m "Initial deployment" -
git push
β Monitor Build
- Go to your Space page
- Click "Logs" tab
- Watch the build progress
- Wait for "Running" status (~5-10 minutes)
- Check for any error messages
β Test Deployment
- Note your Space URL:
https://USERNAME-SPACENAME.hf.space - Test health endpoint:
curl https://USERNAME-SPACENAME.hf.space/ - Expected response:
{"status":"ok"} - Test with a simple upload (use Postman, curl, or your frontend)
β Configure (Optional)
Hardware Upgrade
- Go to Space Settings
- Click "Change hardware"
- Select desired tier (T4 GPU recommended for production)
- Confirm upgrade
Persistent Storage
- Go to Space Settings
- Click "Upgrade storage"
- Select storage tier (Small = $5/month for 20GB)
- Confirm upgrade
Environment Variables
- Go to Space Settings
- Add any required secrets/variables
- Save changes
β Connect Frontend
- Update frontend API URL to:
https://USERNAME-SPACENAME.hf.space - Test end-to-end flow:
- Upload images
- Start processing
- Check progress
- Download results
β Final Checks
- Space is publicly accessible (if intended)
- API responds to all endpoints
- Image upload works
- Processing completes successfully
- Download returns ZIP file
- Cleanup happens after download
β Documentation
- Update your frontend repo with new API URL
- Share your Space link with users
- Add Space badge to your GitHub README (optional):
[](https://huggingface.co/spaces/USERNAME/SPACENAME)
β Monitoring
- Check Space analytics (views, usage)
- Monitor logs for errors
- Watch resource usage in Settings
- Set up billing alerts (if using paid tier)
π Deployment Complete!
Once all items are checked, your Image Selector Backend is live on HuggingFace Spaces!
Your API: https://USERNAME-SPACENAME.hf.space
Your Space: https://huggingface.co/spaces/USERNAME/SPACENAME
π Need Help?
- Check
DEPLOYMENT_GUIDE.mdfor detailed instructions - Check
QUICK_START.mdfor overview - HF Community: https://huggingface.co/spaces
- HF Discord: https://discord.gg/hugging-face