Files
Effi/archive/notes-originales/Projet Effi — Documentation complète 2.md
Folzo d1e12cff60 Initial commit: Documentation Effi v1.0
- Structure complète du projet
- Docker compose de production
- Documentation organisée par thèmes
- Guides d'installation et configuration
- Section dépannage détaillée
- Journal historique
2026-04-04 08:45:59 +02:00

247 lines
8.8 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 📋 Projet Effi — Documentation complète
## 🎯 Objectif
Effi est un assistant IA personnel **100% self-hosted**, avec :
- Personnalité joyeuse, mémoire persistante entre sessions
- Discussion vocale (STT + TTS)
- Recherche internet (Brave Search)
- Prise de notes automatique dans AFFiNE
- Analyse d'images
- RAG sur fichiers personnels (PDF/DOC depuis Nextcloud)
---
## 🖥️ Infrastructure matérielle
|Machine|IP|Rôle|CPU/GPU|
|---|---|---|---|
|**effi-server**|`192.168.1.27`|Serveur principal Docker|Intel J5040 / ~7.6 GB RAM|
|**folzo-Corp** (PC gaming)|`192.168.1.11`|Ollama LLM + STT + TTS|AMD Ryzen 5800X3D / RX 7800 XT 16 GB VRAM|
---
## 🐳 Stack Docker — effi-server (`~/effi/docker-compose.yml`)
## Services actifs
|Service|Image|Port|Rôle|
|---|---|---|---|
|`open-webui`|`ghcr.io/open-webui/open-webui:main`|`3000`|Interface principale Effi|
|`qdrant`|`qdrant/qdrant`|`6333-6334`|Base vectorielle RAG|
|`couchdb`|`couchdb:3.3`|`5984`|Sync Obsidian LiveSync|
|`n8n`|`n8nio/n8n`|`5678`|Automatisation workflows|
|`mcpo`|`ghcr.io/open-webui/mcpo`|`8000`|Proxy MCP pour outils|
|`wol-proxy`|`effi-wol-proxy` (build local)|`3011`|Wake-on-LAN PC gaming|
## Fichier `.env` (`~/effi/.env`)
text
`OLLAMA_HOST=192.168.1.11 PC_GAMING_MAC=XX:XX:XX:XX:XX:XX WEBUI_SECRET_KEY=<clé_aléatoire> COUCHDB_USER=master COUCHDB_PASSWORD=<mot_de_passe> N8N_USER=master N8N_PASSWORD=<mot_de_passe>`
## wol-proxy
Image buildée localement depuis `~/effi/wol-proxy/` — pinge `192.168.1.11:11434`, envoie un magic packet WoL si Ollama ne répond pas.
---
## 🎮 Stack Docker — folzo-Corp (`~/speaches/docker-compose.yml`)
## speaches — STT (Speech To Text)
text
`services: # ───────────────────────────────────────────────────────── # 1. SPEACHES - Speech To Text (STT) OpenAI-compatible # → http://192.168.1.11:8200 # ───────────────────────────────────────────────────────── speaches-stt: image: speaches:rocm-ct2 # image buildée localement (voir ci-dessous) container_name: speaches-stt restart: unless-stopped ports: - "8200:8000" devices: - /dev/kfd - /dev/dri group_add: - "44" # GID video - "991" # GID render security_opt: - seccomp=unconfined environment: - HSA_OVERRIDE_GFX_VERSION=11.0.0 - WHISPER__MODEL=Systran/faster-whisper-large-v3 - WHISPER__LANGUAGE=fr - WHISPER__COMPUTE_TYPE=int8 # float16 non supporté en CPU - WHISPER__DEVICE=cpu # GPU ROCm en cours (rebuild) volumes: - speaches-models:/root/.cache/huggingface speaches-init: image: curlimages/curl:latest container_name: speaches-init restart: "no" depends_on: - speaches-stt entrypoint: > sh -c "sleep 5 && curl -sf -X POST http://speaches-stt:8000/v1/models/Systran%2Ffaster-whisper-large-v3 && echo 'Modèle enregistré'" volumes: speaches-models:`
## openedai-speech — TTS (Text To Speech) (`~/openedai-speech/docker-compose.yml`)
text
`services: openedai-speech: image: ghcr.io/matatonic/openedai-speech container_name: openedai-speech restart: unless-stopped ports: - "8100:8000" volumes: - ./tts-voices:/app/voices - ./tts-config:/app/config devices: - /dev/kfd - /dev/dri group_add: - "44" # GID video - "991" # GID render environment: - HSA_OVERRIDE_GFX_VERSION=11.0.0 - HIP_VISIBLE_DEVICES=0`
---
## ⚙️ Configuration Open WebUI
## Admin Panel → Settings → Connections
- **Ollama URL** : `http://192.168.1.11:3011`
## Admin Panel → Settings → Audio
- **STT Engine** : OpenAI
- **STT URL** : `http://192.168.1.11:8200/v1`
- **STT Model** : `Systran/faster-whisper-large-v3`
- **TTS Engine** : OpenAI
- **TTS URL** : `http://192.168.1.11:8100/v1`
- **TTS Model** : `tts-1-hd`
## Admin Panel → Settings → Documents
- **Embedding Engine** : Ollama
- **Embedding Model** : `bge-m3:latest`
- **Vector Database** : Qdrant
- **Qdrant URL** : `http://qdrant:6333`​
## Modèles Ollama disponibles sur folzo-Corp​
- `qwen2.5:14b` — LLM principal d'Effi
- `bge-m3` — Embeddings RAG
## Workspace Effi (Open WebUI)
- Compte admin : `master`
- Compte utilisateur : `folzo`
- System prompt global configuré avec personnalité + contexte infrastructure​
---
## 🔧 Build speaches ROCm — CTranslate2 gfx1100
## Problème rencontré
L'image speaches ne publie pas d'image ROCm. Il faut builder manuellement. La RX 7800 XT est `gfx1100` mais le Dockerfile par défaut cible `gfx1101` → `hipErrorInvalidDeviceFunction`.
## Solution
bash
`cd ~/speaches git clone https://github.com/speaches-ai/speaches . cd src # Corriger l'architecture GPU : gfx1101 → gfx1100 sed -i 's/gfx1101/gfx1100/g' Dockerfile.rocm-ct2 grep gfx Dockerfile.rocm-ct2 # vérification # Build (~50 min la première fois) docker build -f Dockerfile.rocm-ct2 -t speaches:rocm-ct2 .`
## Ajout MIOpen (fix cuDNN)​
text
`# Dans Dockerfile.rocm-ct2, ajouter dans le cmake : -DWITH_CUDNN=ON -DCUDnn_LIBRARY=/opt/rocm-6.3.4/lib/libMIOpen.so`
> ⚠️ **Statut actuel** : Le rebuild avec `gfx1100` est en cours. speaches fonctionne en **CPU** (int8) en attendant — ~10s pour 5s d'audio sur le Ryzen 5800X3D.​
---
## 🐛 Problèmes rencontrés et solutions
## 1. wol-proxy — image inexistante
**Problème** : Image Docker inexistante sur le registry​
**Solution** : Build local depuis le code Python maison
bash
`cd ~/effi && docker compose up -d --build`
## 2. Interface réseau Ubuntu plantée​
**Problème** : La carte réseau d'effi-server tombe silencieusement
**Solution** : Off/On via NetworkManager
bash
`sudo systemctl restart NetworkManager`
**Fix permanent** (pour NIC Intel i225/i226) :
bash
`echo 'ACTION=="add", SUBSYSTEM=="net", NAME=="enp3s0", RUN+="/usr/sbin/ethtool -s enp3s0 wol g"' \ | sudo tee /etc/udev/rules.d/99-disable-net-powersave.rules`
## 3. Whisper — mauvais repo HuggingFace
**Problème** : Open WebUI envoyait `Systeme/faster-whisper-tiny` (inexistant)
**Solution** : Corriger dans Settings → Audio → STT Model + changer `WHISPER__MODEL` dans docker-compose
## 4. speaches — `PRELOAD_MODELS` format invalide​
**Problème** : La variable `PRELOAD_MODELS` avec un objet JSON crash le conteneur
**Solution** : Supprimer `PRELOAD_MODELS` entièrement, utiliser un service `speaches-init` pour enregistrer le modèle via API au démarrage
## 5. openedai-speech — `group render` introuvable
**Problème** : `group_add: render` échoue car le groupe n'existe pas dans le conteneur
**Solution** : Utiliser les GID numériques `"44"` et `"991"` au lieu des noms
## 6. CTranslate2 float16 sur CPU​
**Problème** : `ValueError: float16 not supported on CPU backend`
**Solution** : `WHISPER__COMPUTE_TYPE=int8`
## 7. mcpo redémarre en boucle​
**Problème** : Config `mcpo-config/config.json` vide au premier démarrage
**Solution** :
bash
`cat > ~/effi/mcpo-config/config.json << 'EOF' {"mcpServers": {}} EOF docker compose restart mcpo`
## 8. Open WebUI lent après reboot​
**Problème** : Conteneurs sans `restart: unless-stopped`
**Solution** : Ajouter `restart: unless-stopped` à tous les services du docker-compose
---
## 📦 Initialisation CouchDB (une seule fois)
bash
`curl -X PUT http://master:MOT_DE_PASSE@192.168.1.27:5984/_users curl -X PUT http://master:MOT_DE_PASSE@192.168.1.27:5984/_replicator curl -X PUT http://master:MOT_DE_PASSE@192.168.1.27:5984/obsidian-livesync`
---
## 🔌 Ouverture de ports firewall
Sur **folzo-Corp** (Bazzite/Fedora) :
bash
`sudo firewall-cmd --add-port=8200/tcp --permanent # speaches STT sudo firewall-cmd --add-port=8100/tcp --permanent # openedai-speech TTS sudo firewall-cmd --reload`
---
## ✅ État actuel du pipeline vocal
|Étape|Status|Détail|
|---|---|---|
|STT (Whisper)|✅ Fonctionnel|speaches CPU, large-v3, ~10s/phrase|
|LLM (Ollama)|✅ Fonctionnel|qwen2.5:14b sur folzo-Corp|
|TTS (openedai-speech)|✅ Fonctionnel|tts-1-hd, ROCm activé|
|WOL PC gaming|✅ Fonctionnel|wol-proxy sur port 3011|
|RAG Qdrant|🔧 En cours|Nextcloud → indexation à configurer|
---
## 🚧 Prochaines étapes
-  Finaliser le rebuild `speaches:rocm-ct2` avec `gfx1100` → activer GPU pour STT
-  Configurer le RAG Qdrant avec les fichiers Nextcloud (~1 GB, ~1000 fichiers)
-  Tester mem0 / MCP pour la mémoire persistante d'Effi​
-  Configurer n8n pour les workflows automatiques
-  Sync Obsidian LiveSync sur mobile​