Spaces:
Running
Running
File size: 2,890 Bytes
0ebc7ca |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
ο»Ώ# π 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:**
```bash
# Install dependencies
pip install -r requirements.txt
# Run locally
python app.py
```
### **Docker Build:**
```bash
# 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:
1. **Check logs** for specific error messages
2. **Verify Python version** (should be 3.10+)
3. **Clear build cache** if using Docker
4. **Check network connectivity** for package downloads
The build should now succeed on most platforms including HuggingFace Spaces! π
|