| # π¦ COMPLETE DEPLOYMENT PACKAGE |
|
|
| ## All Files Ready for Hugging Face Deployment |
|
|
| --- |
|
|
| ## β
REQUIRED FILES (Upload These) |
|
|
| ### 1. **app.py** |
| - **Description:** Main application file |
| - **Source:** Your app-10.py (renamed) |
| - **Size:** ~20 KB |
| - **Purpose:** The Gradio interface and NeRF processing logic |
| - **Status:** β
Ready |
|
|
| ### 2. **requirements.txt** |
| - **Description:** Python package dependencies |
| - **Size:** ~200 bytes |
| - **Purpose:** Tells HF which Python packages to install |
| - **Contents:** |
| ``` |
| gradio>=4.0.0 |
| opencv-python-headless>=4.8.0 |
| numpy>=1.24.0 |
| Pillow>=10.0.0 |
| nerfstudio>=1.0.0 |
| torch>=2.0.0 |
| torchvision>=0.15.0 |
| ``` |
| - **Status:** β
Ready |
|
|
| ### 3. **packages.txt** |
| - **Description:** System package dependencies |
| - **Size:** ~10 bytes |
| - **Purpose:** Installs COLMAP system package |
| - **Contents:** |
| ``` |
| colmap |
| ``` |
| - **Status:** β
Ready |
|
|
| ### 4. **README.md** |
| - **Description:** Space documentation and user guide |
| - **Size:** ~5 KB |
| - **Purpose:** Shows up on your Space homepage |
| - **Includes:** Features, usage instructions, limitations |
| - **Status:** β
Ready |
|
|
| ### 5. **.gitignore** |
| - **Description:** Git ignore rules |
| - **Size:** ~300 bytes |
| - **Purpose:** Prevents committing temporary/large files |
| - **Status:** β
Ready (optional but recommended) |
|
|
| --- |
|
|
| ## π DOCUMENTATION FILES (For Reference) |
|
|
| ### 6. **DEPLOYMENT_STEPS.txt** |
| - **Description:** Step-by-step deployment guide |
| - **Purpose:** Follow these instructions to deploy |
| - **DO NOT upload to Space** (reference only) |
|
|
| ### 7. **HF_PRO_DEPLOYMENT.md** |
| - **Description:** Comprehensive deployment documentation |
| - **Purpose:** Detailed reference guide |
| - **DO NOT upload to Space** (reference only) |
|
|
| ### 8. **QUICK_DEPLOY_CHECKLIST.md** |
| - **Description:** Quick reference checklist |
| - **Purpose:** Fast deployment overview |
| - **DO NOT upload to Space** (reference only) |
|
|
| ### 9. **OUTPUT_COMPARISON.md** |
| - **Description:** Comparison between output types |
| - **Purpose:** Understand point clouds vs meshes |
| - **DO NOT upload to Space** (reference only) |
|
|
| ### 10. **QUICK_ANSWER.md** |
| - **Description:** Quick output type reference |
| - **Purpose:** Understanding your app's output |
| - **DO NOT upload to Space** (reference only) |
|
|
| ### 11. **export_model_updated.py** |
| - **Description:** Optional upgrade for mesh export |
| - **Purpose:** If you want textured meshes like Mantis example |
| - **DO NOT upload to Space** (use only if upgrading) |
|
|
| --- |
|
|
| ## π― WHAT TO UPLOAD TO HUGGING FACE |
|
|
| **Upload ONLY these 5 files:** |
|
|
| ``` |
| β
app.py |
| β
requirements.txt |
| β
packages.txt |
| β
README.md |
| β
.gitignore (optional) |
| ``` |
|
|
| **DO NOT upload:** |
| - Documentation files (*.md) |
| - Tutorial files |
| - This file |
| - export_model_updated.py (unless you're integrating it) |
|
|
| --- |
|
|
| ## π FILE LOCATIONS |
|
|
| All files are in: `/mnt/user-data/outputs/` |
|
|
| To download all at once: |
| 1. Select all files in the outputs folder |
| 2. Download to your computer |
| 3. Upload the 5 required files to HF Space |
|
|
| --- |
|
|
| ## π QUICK START |
|
|
| 1. **Download** all files from `/mnt/user-data/outputs/` |
| 2. **Read** DEPLOYMENT_STEPS.txt |
| 3. **Create** HF Space |
| 4. **Upload** the 5 required files |
| 5. **Set** GPU to A10G small |
| 6. **Wait** for build (~10 min) |
| 7. **Test** with a video |
| 8. **Done!** π |
|
|
| --- |
|
|
| ## π PRE-DEPLOYMENT CHECKLIST |
|
|
| Before you start: |
|
|
| - [ ] Have Hugging Face Pro account ($9/month) |
| - [ ] Have downloaded all files |
| - [ ] Have read DEPLOYMENT_STEPS.txt |
| - [ ] Have test video ready (30-60 seconds) |
| - [ ] Understand costs (~$1/hour GPU usage) |
| - [ ] Decided on Space name |
| - [ ] Ready to wait ~10 min for build |
|
|
| --- |
|
|
| ## π° COST SUMMARY |
|
|
| **One-time setup:** Free (just time) |
| **Monthly costs:** |
| - HF Pro: $9/month (you already have) |
| - GPU usage: ~$1.05/hour when running |
| - Per video: ~$0.80 (assuming 45 min processing) |
|
|
| **Monthly estimates:** |
| - 10 videos: ~$17 total |
| - 20 videos: ~$25 total |
| - 50 videos: ~$49 total |
|
|
| --- |
|
|
| ## βοΈ RECOMMENDED SETTINGS |
|
|
| ```yaml |
| Hardware: A10G small |
| Visibility: Private |
| Sleep: 15 minutes |
| Cost: ~$1.05/hour |
| Processing: 20-45 min/video |
| ``` |
|
|
| --- |
|
|
| ## π IF YOU GET STUCK |
|
|
| 1. **Check DEPLOYMENT_STEPS.txt** - Detailed instructions |
| 2. **Check Logs** - In your Space's Logs tab |
| 3. **Check HF_PRO_DEPLOYMENT.md** - Troubleshooting section |
| 4. **Contact HF Support** - https://huggingface.co/support |
|
|
| --- |
|
|
| ## π FILE CHECKLIST |
|
|
| Before uploading, verify you have: |
|
|
| ``` |
| β
app.py (renamed from app-10.py) |
| β
requirements.txt (8 lines) |
| β
packages.txt (1 line: "colmap") |
| β
README.md (with Space metadata at top) |
| β
.gitignore (optional but recommended) |
| ``` |
|
|
| **Total size:** ~25 KB (very small!) |
|
|
| --- |
|
|
| ## π WHAT HAPPENS AFTER UPLOAD |
|
|
| 1. **HF builds your Space** (~10 min) |
| 2. **Installs COLMAP** (system package) |
| 3. **Installs Python packages** (PyTorch, Nerfstudio, etc.) |
| 4. **Downloads CUDA** (for GPU) |
| 5. **Starts Gradio app** |
| 6. **β
Space is live!** |
|
|
| --- |
|
|
| ## π USEFUL LINKS |
|
|
| **Your Space:** (after creation) |
| ``` |
| https://huggingface.co/spaces/YOUR_USERNAME/nerf-3d-reconstruction |
| ``` |
|
|
| **HF Spaces Docs:** |
| ``` |
| https://huggingface.co/docs/hub/spaces |
| ``` |
|
|
| **HF Billing:** |
| ``` |
| https://huggingface.co/settings/billing |
| ``` |
|
|
| --- |
|
|
| ## β¨ YOU HAVE EVERYTHING! |
|
|
| All files are ready. Just follow DEPLOYMENT_STEPS.txt and you'll be up and running in about an hour. |
|
|
| **Good luck! π** |
|
|
| --- |
|
|
| ## π NEED HELP? |
|
|
| If you encounter issues: |
| 1. Read the error message in Logs |
| 2. Check DEPLOYMENT_STEPS.txt troubleshooting section |
| 3. Search HF Community forums |
| 4. Contact HF Support |
|
|
| **Most common issues are:** |
| - Forgot to upload packages.txt |
| - Forgot to set GPU hardware |
| - Set to Public instead of Private |
| - Forgot to wait for full build |
|
|
| All easily fixed! π |
|
|