Setup Kaggle + Colab GPU — 1-clic

[Opus47-D576] WEVAL pool +2 GPUs T4 free — USER action 5min

93→95
agents pool target
2× T4
GPUs free
0€
cost
5 min
setup time
1Télécharger le notebook prêt
📥 weval-kaggle-gpu-notebook.ipynb

Le notebook contient 7 cellules : install deps, load Llama 3.2 1B, FastAPI server, cloudflared tunnel, push URL auto.

2Aller sur Kaggle
→ kaggle.com/code

Click + CreateNew NotebookImport (icon haut droite) → upload weval-kaggle-gpu-notebook.ipynb

Activer GPU T4 : Settings (icône engrenage à droite) → Accelerator → GPU T4 x2
3Run All

Click Run All (▶▶ icon ou Ctrl+Shift+Enter)

~3 min : install deps + load model + start FastAPI + cloudflared tunnel

La cellule 4 imprime: ✅ TUNNEL_URL: https://xxxxx.trycloudflare.com

La cellule 5 push automatiquement vers WEVAL S204.

4Vérifier intégration WEVAL

Tester l'endpoint:

curl -X POST https://weval-consulting.com/api/wevia-kaggle-gpu.php \
  -H "Content-Type: application/json" \
  -d '{"message":"hi WEVAL","max_tokens":30}'
✅ Si réponse non-vide reçue → Kaggle GPU intégré dans le pool de 93 agents (devient 94)
1Télécharger le notebook
📥 weval-colab-gpu-notebook.ipynb

Identical architecture but uses Qwen 2.5 1.5B (no auth required, fits T4 13GB).

2Ouvrir Colab
→ colab.research.google.com

File → Upload notebook → select weval-colab-gpu-notebook.ipynb

Activer GPU T4 : Runtime → Change runtime type → T4 GPU (free tier)
3Runtime → Run all (Ctrl+F9)

~2 min de setup. Cellule 4 imprime TUNNEL_URL + cellule 5 push auto.

4Vérifier
curl -X POST https://weval-consulting.com/api/wevia-colab-gpu.php \
  -H "Content-Type: application/json" \
  -d '{"message":"hi","max_tokens":30}'
✅ Si OK → pool passe à 95 agents (avec Kaggle déjà actif)

⚙ Architecture technique

1. Le notebook lance FastAPI sur port 8000 dans la VM Kaggle/Colab
2. Cloudflared tunnel expose un URL public *.trycloudflare.com
3. Le notebook POST l'URL à /api/{kaggle|colab}-tunnel-push.php qui l'écrit dans tunnel-url.txt
4. Les bridges wevia-{kaggle|colab}-gpu.php lisent ce fichier et proxy les requests
5. Le mass-orchestrator (D569) appelle ces bridges en parallèle avec les autres 91 agents

⏱ Limites free tier:
• Kaggle: 30h/semaine GPU, 9h max session — coupé sinon
• Colab: ~12h/jour, 90min idle timeout — keep browser tab open
• Stratégie: garder Kaggle ouvert sur 1 onglet + Colab sur autre = 2 GPUs en permanence