refactor: consolidate model management into Ansible playbook
Remove flux/musicgen standalone implementations in favor of ComfyUI: - Delete models/flux/ and models/musicgen/ directories - Remove redundant scripts (install.sh, download-models.sh, prepare-template.sh) - Update README.md to reference Ansible playbook commands - Update playbook.yml to remove flux/musicgen service definitions - Add COMFYUI_MODELS.md with comprehensive model installation guide - Update stop-all.sh to only manage orchestrator and vLLM services All model downloads and dependency management now handled via Ansible playbook tags (base, python, vllm, comfyui, comfyui-essential). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
46
README.md
46
README.md
@@ -85,9 +85,9 @@ Unlike the Docker-based version (`orchestrator.py`), the subprocess implementati
|
||||
# - PORT=9000 (orchestrator port)
|
||||
```
|
||||
|
||||
3. **Run setup (installs dependencies, downloads models):**
|
||||
3. **Run setup (installs dependencies via Ansible):**
|
||||
```bash
|
||||
bash scripts/install.sh
|
||||
ansible-playbook playbook.yml
|
||||
```
|
||||
|
||||
4. **Start all services:**
|
||||
@@ -105,11 +105,14 @@ Unlike the Docker-based version (`orchestrator.py`), the subprocess implementati
|
||||
If you prefer step-by-step setup:
|
||||
|
||||
```bash
|
||||
# Install system dependencies via Ansible
|
||||
ansible-playbook playbook.yml --tags base,python,dependencies
|
||||
|
||||
# Download model weights
|
||||
bash scripts/download-models.sh
|
||||
# Install system dependencies and download models via Ansible
|
||||
# Use specific tags for selective installation:
|
||||
# - base: Base system packages
|
||||
# - python: Python runtime via pyenv
|
||||
# - vllm: vLLM dependencies and Qwen model
|
||||
# - comfyui: ComfyUI installation
|
||||
# - comfyui-essential: Essential ComfyUI models only
|
||||
ansible-playbook playbook.yml --tags base,python,vllm
|
||||
|
||||
# Start orchestrator
|
||||
python3 model-orchestrator/orchestrator_subprocess.py
|
||||
@@ -250,10 +253,7 @@ qwen-2.5-7b:
|
||||
run_server(model=model, port=port)
|
||||
```
|
||||
|
||||
3. **Download model weights:**
|
||||
```bash
|
||||
bash scripts/download-models.sh
|
||||
```
|
||||
3. **Models are downloaded automatically by the playbook** when using the appropriate tags (vllm, comfyui, etc.)
|
||||
|
||||
4. **Restart orchestrator:**
|
||||
```bash
|
||||
@@ -363,7 +363,7 @@ sudo journalctl -u ai-orchestrator -n 50
|
||||
|
||||
**Common issues:**
|
||||
- Out of GPU memory: Check VRAM usage with `nvidia-smi`
|
||||
- Missing model weights: Run `bash scripts/download-models.sh`
|
||||
- Missing model weights: Run `ansible-playbook playbook.yml --tags vllm` or `--tags comfyui-essential`
|
||||
- Port conflicts: Check if port is already in use with `lsof -i :9000`
|
||||
|
||||
### Orchestrator Not Responding
|
||||
@@ -389,11 +389,11 @@ curl -X POST http://localhost:8000/v1/chat/completions \
|
||||
# Check HF_TOKEN is set
|
||||
echo $HF_TOKEN
|
||||
|
||||
# Set token manually
|
||||
export HF_TOKEN=your_token_here
|
||||
# Set token in .env file
|
||||
echo "HF_TOKEN=your_token_here" >> .env
|
||||
|
||||
# Re-run download
|
||||
bash scripts/download-models.sh
|
||||
# Re-run Ansible playbook to download models
|
||||
ansible-playbook playbook.yml --tags vllm
|
||||
```
|
||||
|
||||
## Project Structure
|
||||
@@ -408,22 +408,18 @@ runpod/
|
||||
│ ├── vllm/
|
||||
│ │ ├── server.py # vLLM text generation service
|
||||
│ │ └── requirements.txt
|
||||
│ ├── flux/
|
||||
│ │ ├── server.py # Flux image generation service
|
||||
│ │ └── requirements.txt
|
||||
│ └── musicgen/
|
||||
│ ├── server.py # MusicGen audio generation service
|
||||
│ └── requirements.txt
|
||||
│ └── comfyui/ # ComfyUI for image/video/audio generation
|
||||
│ ├── start.sh # ComfyUI startup script
|
||||
│ └── models/ # ComfyUI models directory
|
||||
├── scripts/
|
||||
│ ├── install.sh # Setup script (Ansible + downloads)
|
||||
│ ├── start-all.sh # Start orchestrator + models
|
||||
│ ├── stop-all.sh # Stop all services
|
||||
│ └── download-models.sh # Download model weights from HuggingFace
|
||||
│ └── stop-all.sh # Stop all services
|
||||
├── systemd/
|
||||
│ └── ai-orchestrator.service # systemd service file (for VPS)
|
||||
├── playbook.yml # Ansible playbook for system setup
|
||||
├── inventory.yml # Ansible inventory
|
||||
├── .env.example # Environment variables template
|
||||
├── COMFYUI_MODELS.md # ComfyUI models usage guide
|
||||
└── README.md # This file
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user