Spaces:
Running
Running
A newer version of the Gradio SDK is available:
5.44.1
ο»Ώ# π Deployment Fix - Resolving Build Issues
π§ Fixed Issues
1. Requirements.txt Problems
- β Removed problematic packages (flash-attn, xformers)
- β Added missing dependencies (pyyaml, requests)
- β Pinned versions for stability
- β Focused on core functionality only
2. Docker Build Optimization
- β Updated Dockerfile with better error handling
- β Added build-essential for compilation
- β Increased timeout for slow builds
- β Added health check
- β Created .dockerignore to reduce build context
3. Dependency Management
- β CPU-only PyTorch for reliable deployment
- β Stable numpy/scipy versions
- β Removed optional heavy packages
- β Maintained core TTS and API functionality
π¦ Current Build Status
The repository should now build successfully with:
Core Features Available:
β
FastAPI endpoints for avatar generation
β
Gradio web interface
β
Advanced TTS system with multiple fallbacks
β
Audio generation and processing
β
Image URL support
β
Voice profile selection
OmniAvatar Video Features:
β³ Requires model download (~30GB)
β³ Available after running python setup_omniavatar.py
π¨ Build Commands
Local Build:
# Install dependencies
pip install -r requirements.txt
# Run locally
python app.py
Docker Build:
# Build image
docker build -t omniavatar-app .
# Run container
docker run -p 7860:7860 omniavatar-app
HuggingFace Spaces:
The repository should now build automatically when pushed to HF Spaces.
π What Changed
requirements.txt:
- Removed: flash-attn, xformers, omegaconf, datasets, protobuf
- Added: pyyaml, requests (missing dependencies)
- Pinned: numpy<1.25.0, scipy<1.12.0 for stability
- CPU-only PyTorch for reliable deployment
Dockerfile:
- Added build-essential for compilation needs
- Increased timeout for slow package installs
- Better directory structure creation
- Added health check endpoint
- More robust error handling
.dockerignore:
- Excluded large files (pretrained_models/, *.md files)
- Reduced build context size significantly
- Faster builds and smaller images
π― Deployment Strategy
Phase 1: TTS-Only Mode (Current)
- β Builds reliably
- β Full TTS functionality
- β Web interface working
- β API endpoints functional
Phase 2: Full OmniAvatar (After Model Download)
- Download models manually or via script
- Enable video generation capabilities
- Full avatar animation features
π‘ Troubleshooting
If builds still fail:
- Check logs for specific error messages
- Verify Python version (should be 3.10+)
- Clear build cache if using Docker
- Check network connectivity for package downloads
The build should now succeed on most platforms including HuggingFace Spaces! π