- Add full architecture diagram with all machines (FolzoCorp, EffiServer, NAS) - Document all services on each machine with ports and roles - Add memory management section (auto-unload scripts) - Add project structure tree - Update technologies list - Add documentation links
288 lines
11 KiB
Markdown
288 lines
11 KiB
Markdown
# 🤖 Effi - Assistant IA Personnel Self-Hosted
|
|
|
|
Effi est un assistant IA personnel **100% auto-hébergé**, avec mémoire persistante, discussion vocale, génération d'images/audio, et surveillance système.
|
|
|
|
---
|
|
|
|
## 🏗️ Architecture
|
|
|
|
### Infrastructure Multi-Machines
|
|
|
|
| Machine | IP | Rôle | Services |
|
|
|---------|-----|------|----------|
|
|
| **effi-server** | `192.168.1.27` | Serveur Docker principal | OpenWebUI, Qdrant, n8n, Ollama proxy |
|
|
| **folzo-Corp** | `192.168.1.11` | LLM + STT + TTS + Gen | Ollama, ComfyUI, effi-stt, openedai-speech, kreuzberg |
|
|
| **NAS Synology** | `192.168.1.25` | Monitoring | Beszel Hub |
|
|
|
|
### Schéma Global
|
|
|
|
```
|
|
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
│ NAS SYNOLOGY (192.168.1.25) │
|
|
│ Beszel Hub :8090 │
|
|
└─────────────────────────────────────────────────────────────────────────────┘
|
|
│ │ │
|
|
│ Monitoring │ Monitoring │ Monitoring
|
|
▼ ▼ ▼
|
|
┌─────────────────────────────────┐ ┌─────────────────────────────────────────┐
|
|
│ EFFI SERVER (192.168.1.27) │ │ FOLZO-CORP (192.168.1.11) │
|
|
│ │ │ │
|
|
│ ┌──────────────┐ ┌──────────┐ │ │ ┌──────────────┐ ┌──────────────┐ │
|
|
│ │ Open WebUI │ │ Qdrant │ │ │ │ Ollama │ │ ComfyUI │ │
|
|
│ │ Port 3000 │ │ Port 6333│ │ │ │ Port 11434 │ │ Port 8188 │ │
|
|
│ └──────────────┘ └──────────┘ │ │ │ qwen3:8b │ │ Image/Audio │ │
|
|
│ │ │ └──────────────┘ └──────────────┘ │
|
|
│ ┌──────────────┐ ┌──────────┐ │ │ │
|
|
│ │ n8n │ │ wol-proxy│ │ │ ┌──────────────┐ ┌──────────────┐ │
|
|
│ │ Port 5678 │ │ Port 3011│ │ │ │ effi-stt │ │ openedai │ │
|
|
│ └──────────────┘ └──────────┘ │ │ │ Port 8200 │ │ Port 8100 │ │
|
|
│ │ │ │ Whisper STT │ │ TTS │ │
|
|
│ ┌──────────────┐ ┌──────────┐ │ │ └──────────────┘ └──────────────┘ │
|
|
│ │ Beszel Agent │ │ Watchtower│ │ │ │
|
|
│ └──────────────┘ └──────────┘ │ │ ┌──────────────┐ ┌──────────────┐ │
|
|
└─────────────────────────────────┘ │ │ kreuzberg │ │ Beszel Agent │ │
|
|
│ │ Port 8300 │ │ Monitoring │ │
|
|
│ │ Doc Extract │ └──────────────┘ │
|
|
│ └──────────────┘ │
|
|
│ RX 7800 XT (VRAM 17GB) │
|
|
└─────────────────────────────────────────┘
|
|
```
|
|
|
|
---
|
|
|
|
## 📦 Services
|
|
|
|
### FolzoCorp (192.168.1.11)
|
|
|
|
| Service | Port | Image | Rôle | RAM/VRAM | Auto-unload |
|
|
|---------|------|-------|------|----------|-------------|
|
|
| **Ollama** | 11434 | Native | LLM inference | Variable | N/A |
|
|
| **ComfyUI** | 8188 | `yanwk/comfyui-boot:rocm` | Image + Audio generation | 18GB shm | ✅ après 10min idle |
|
|
| **effi-stt** | 8200 | Build local | Whisper STT | ~20MB | ✅ après 5min idle |
|
|
| **openedai-speech** | 8100 | `ghcr.io/matatonic/openedai-speech` | TTS | ~15MB | Non (GPU) |
|
|
| **kreuzberg** | 8300 | `ghcr.io/kreuzberg-dev/kreuzberg:latest` | Document extraction | ~5MB | ✅ après 10min idle |
|
|
| **beszel-agent** | - | `henrygd/beszel-agent:latest` | Monitoring | ~5MB | Auto-start |
|
|
|
|
### EffiServer (192.168.1.27)
|
|
|
|
| Service | Port | Image | Rôle |
|
|
|---------|------|-------|------|
|
|
| **Open WebUI** | 3000 | `ghcr.io/open-webui/open-webui:main` | Interface IA |
|
|
| **Qdrant** | 6333 | `qdrant/qdrant:latest` | Vector DB (RAG) |
|
|
| **n8n** | 5678 | `docker.n8n.io/n8nio/n8n:latest` | Automatisation |
|
|
| **wol-proxy** | 3011 | Build local | Wake-on-LAN + Ollama proxy |
|
|
| **beszel-agent** | - | `henrygd/beszel-agent:latest` | Monitoring |
|
|
|
|
### NAS Synology (192.168.1.25)
|
|
|
|
| Service | Port | Image | Rôle |
|
|
|---------|------|-------|------|
|
|
| **Beszel Hub** | 8090 | `henrygd/beszel:latest` | Monitoring central |
|
|
|
|
---
|
|
|
|
## 🎯 Fonctionnalités
|
|
|
|
### 💬 Chat IA
|
|
- **Interface**: Open WebUI
|
|
- **LLM principal**: qwen3:8b (via Ollama)
|
|
- **Autres modèles disponibles**: qwen3.5, gemma4, deepseek-r1, mistral, etc.
|
|
|
|
### 🎤 Pipeline Vocal
|
|
- **STT**: Whisper large-v3 via effi-stt (CPU, déchargement auto)
|
|
- **TTS**: XTTS v2 via openedai-speech (GPU ROCm)
|
|
|
|
### 🖼️ Génération Images/Audio
|
|
- **ComfyUI**: Workflows pour image et audio
|
|
- **Modèle audio**: ACE-Step ( génération musicale)
|
|
- **Modèles image**: Multiples checkpoints disponibles
|
|
|
|
### 📄 Extraction Documents
|
|
- **Kreuzberg**: Extraction 90+ formats (PDF, DOCX, images, etc.)
|
|
- Intégré à OpenWebUI via CONTENT_EXTRACTION_ENGINE=docling
|
|
|
|
### 🧠 Mémoire
|
|
- **Type**: Mémoire manuelle via OpenWebUI (snippets)
|
|
- **RAG**: Qdrant pour embeddings sémantiques
|
|
|
|
### 📊 Monitoring
|
|
- **Beszel**: CPU, RAM, VRAM, GPU sur toutes les machines
|
|
- **Alertes**: Configurables par système
|
|
|
|
---
|
|
|
|
## 📁 Structure du Projet
|
|
|
|
```
|
|
effi/
|
|
├── beszel/ # Configuration Beszel
|
|
│ ├── docker-compose-hub.yml # Hub (Synology)
|
|
│ ├── docker-compose-agent-folzocorp.yml # Agent FolzoCorp
|
|
│ └── docker-compose-agent-effiserver.yml # Agent EffiServer
|
|
│
|
|
├── comfyui/ # ComfyUI (Image/Audio)
|
|
│ ├── docker-compose.yml
|
|
│ ├── custom_nodes/ # Nodes personnalisés
|
|
│ ├── models/ # Modèles checkpoints, VAE, LoRA
|
|
│ └── workflows/ # Workflows JSON
|
|
│
|
|
├── effi-stt/ # STT Whisper
|
|
│ ├── docker-compose.yml
|
|
│ ├── Dockerfile
|
|
│ └── main.py # API avec timeout auto-unload
|
|
│
|
|
├── effi-kreuzberg/ # Documentation Kreuzberg
|
|
│ ├── README.md
|
|
│ └── MIGRATION.md
|
|
│
|
|
├── scripts/ # Scripts utilitaires
|
|
│ ├── beszel_client.py # Client API Beszel
|
|
│ ├── comfyui-memory-manager.py # Restart ComfyUI après idle
|
|
│ ├── kreuzberg-memory-manager.py # Restart Kreuzberg si >2GB
|
|
│ └── start-memory-monitors.sh
|
|
│
|
|
├── systemd/ # Services systemd
|
|
│ ├── comfyui-memory-manager.service
|
|
│ ├── kreuzberg-memory-manager.service
|
|
│ └── beszel-agent-wake.service
|
|
│
|
|
├── docs/ # Documentation
|
|
│ ├── SESSION-2026-04-12-RAM-BESZEL.md
|
|
│ ├── BESZEL-INSTALLATION.md
|
|
│ └── MEMOIRE-GESTION.md
|
|
│
|
|
└── docker-compose*.yml # Divers compose files (legacy/backup)
|
|
```
|
|
|
|
---
|
|
|
|
## 🚀 Démarrage
|
|
|
|
### FolzoCorp
|
|
|
|
```bash
|
|
# Tous les services Docker
|
|
cd ~/Documents/OpenCode/Projets/Effi/comfyui && docker compose up -d
|
|
cd ~/Documents/OpenCode/Projets/Effi/effi-stt && docker compose up -d
|
|
cd ~/Documents/OpenCode/Projets/Effi/beszel && docker compose -f docker-compose-agent-folzocorp.yml up -d
|
|
|
|
# Services memory (systemd)
|
|
sudo systemctl start comfyui-memory-manager
|
|
sudo systemctl start kreuzberg-memory-manager
|
|
|
|
# Ollama (native)
|
|
systemctl --user start ollama
|
|
```
|
|
|
|
### EffiServer
|
|
|
|
```bash
|
|
cd ~/effi
|
|
docker compose up -d
|
|
```
|
|
|
|
---
|
|
|
|
## 🔧 Configuration
|
|
|
|
### Variables d'Environnement
|
|
|
|
**effi-stt**:
|
|
- `INACTIVITY_TIMEOUT=300` - Timeout avant déchargement (secondes)
|
|
|
|
**ComfyUI**:
|
|
- shm_size: 8GB (mémoire partagée)
|
|
- Monitoring: Script comfyui-memory-manager.py
|
|
|
|
**Beszel**:
|
|
- HUB_URL: http://192.168.1.25:8090
|
|
|
|
---
|
|
|
|
## 📊 Monitoring
|
|
|
|
### Beszel
|
|
|
|
- **URL**: http://192.168.1.25:8090
|
|
- **Agents actifs**:
|
|
- FolzoCorp (192.168.1.11) - GPU AMD RX 7800 XT
|
|
- EffiServer (192.168.1.27) - Intel J5040
|
|
|
|
### Scripts Memory
|
|
|
|
| Script | Condition | Action |
|
|
|--------|-----------|--------|
|
|
| comfyui-memory-manager.py | 10min idle + VRAM<1% + RAM>5GB | Restart container |
|
|
| kreuzberg-memory-manager.py | 10min idle + RAM>2GB | Restart container |
|
|
| effi-stt | 5min idle | Déchargement modèle Whisper |
|
|
|
|
### Commandes Utiles
|
|
|
|
```bash
|
|
# Statut services
|
|
sudo systemctl status comfyui-memory-manager kreuzberg-memory-manager
|
|
docker ps
|
|
|
|
# Logs
|
|
journalctl -u comfyui-memory-manager -f
|
|
docker logs -f comfyui
|
|
|
|
# Métriques Beszel
|
|
python3 scripts/beszel_client.py --system folzocorp --check stats
|
|
```
|
|
|
|
---
|
|
|
|
## 📚 Documentation
|
|
|
|
- [Installation Beszel](./docs/BESZEL-INSTALLATION.md)
|
|
- [Gestion Mémoire](./docs/MEMOIRE-GESTION.md)
|
|
- [Session 2026-04-12](./docs/SESSION-2026-04-12-RAM-BESZEL.md)
|
|
- [Guide ACE-Step](./docs/guide-ace-step.md)
|
|
- [Guide ComfyUI](./comfyui/README.md)
|
|
|
|
---
|
|
|
|
## 🔗 Technologies
|
|
|
|
| Domaine | Technologies |
|
|
|---------|-------------|
|
|
| **LLM** | Ollama, qwen3:8b |
|
|
| **Interface** | Open WebUI |
|
|
| **STT** | Faster Whisper (CPU) |
|
|
| **TTS** | XTTS v2 (ROCm GPU) |
|
|
| **Image/Audio** | ComfyUI + ACE-Step |
|
|
| **Vector DB** | Qdrant |
|
|
| **Document** | Kreuzberg (docling) |
|
|
| **Automatisation** | n8n |
|
|
| **GPU** | AMD RX 7800 XT (ROCm) |
|
|
| **Monitoring** | Beszel |
|
|
|
|
---
|
|
|
|
## 📝 Historique
|
|
|
|
**Avril 2026** - Optimisation RAM + Monitoring
|
|
- Ajout scripts déchargement mémoire (ComfyUI, Kreuzberg, effi-stt)
|
|
- Installation Beszel (Hub + 2 agents)
|
|
- Service systemd pour restart après veille
|
|
|
|
**Mars 2026** - Génération Audio
|
|
- Intégration ACE-Step pour génération musicale
|
|
- ComfyUI avec ROCm
|
|
|
|
**Février 2026** - Stack Vocale
|
|
- effi-stt avec Whisper large-v3
|
|
- openedai-speech avec XTTS v2
|
|
- Kreuzberg pour extraction documents
|
|
|
|
---
|
|
|
|
## 🙋 Auteur
|
|
|
|
**Folzo** - [gitea.folzocorp.fr/Folzo](https://gitea.folzocorp.fr/Folzo)
|
|
|
|
---
|
|
|
|
*Dernière mise à jour : Avril 2026*
|