diff --git a/MyIA.AI.Notebooks/Probas/Infer/scripts/setup_environment.ps1 b/MyIA.AI.Notebooks/Probas/Infer/scripts/setup_environment.ps1 index fa3e136d13..90a59fc061 100644 --- a/MyIA.AI.Notebooks/Probas/Infer/scripts/setup_environment.ps1 +++ b/MyIA.AI.Notebooks/Probas/Infer/scripts/setup_environment.ps1 @@ -40,7 +40,7 @@ if (-not $SkipDotnetInteractive) { Write-Status " dotnet-interactive already installed" "Green" } else { Write-Status " Installing dotnet-interactive..." - dotnet tool install -g Microsoft.dotnet-interactive + dotnet tool install -g Microsoft.dotnet-interactive --version 1.0.617701 if ($LASTEXITCODE -eq 0) { Write-Status " dotnet-interactive installed successfully" "Green" } else { diff --git a/MyIA.AI.Notebooks/Probas/Infer/scripts/setup_environment.sh b/MyIA.AI.Notebooks/Probas/Infer/scripts/setup_environment.sh index a32b47ed06..2537a4e32c 100755 --- a/MyIA.AI.Notebooks/Probas/Infer/scripts/setup_environment.sh +++ b/MyIA.AI.Notebooks/Probas/Infer/scripts/setup_environment.sh @@ -38,7 +38,7 @@ if [ "$SKIP_DOTNET_INTERACTIVE" -eq 0 ]; then status " dotnet-interactive already installed" else status " Installing dotnet-interactive..." - if dotnet tool install -g Microsoft.dotnet-interactive; then + if dotnet tool install -g Microsoft.dotnet-interactive --version 1.0.617701; then status " dotnet-interactive installed successfully" else status " Failed to install dotnet-interactive" >&2 diff --git a/MyIA.AI.Notebooks/RL/requirements.txt b/MyIA.AI.Notebooks/RL/requirements.txt index 2eeeb4128f..fdd8151830 100644 --- a/MyIA.AI.Notebooks/RL/requirements.txt +++ b/MyIA.AI.Notebooks/RL/requirements.txt @@ -10,6 +10,12 @@ pettingzoo[classic]>=1.24.0 # Multi-agent environments — notebook 6 (IQL, P # Environments highway-env>=1.8 # Highway driving environment (Notebook 3) +# Post-training SOTA (rlpt_0d, rlpt_0e, rlpt_0f) : bras trl compares aux boucles maison +trl>=1.10 # RewardTrainer, DPOTrainer, GRPOTrainer (PPOTrainer retire en 1.10) +transformers>=5.12 +datasets>=5.0 +tokenizers>=0.21 + # Data / Visualization pandas>=2.0 # Tableaux de resultats Q-Learning — notebook 4 moviepy>=1.0 # Video recording of agent behavior diff --git a/MyIA.AI.Notebooks/Sudoku/requirements.txt b/MyIA.AI.Notebooks/Sudoku/requirements.txt index ed0f328d1b..cc57956177 100644 --- a/MyIA.AI.Notebooks/Sudoku/requirements.txt +++ b/MyIA.AI.Notebooks/Sudoku/requirements.txt @@ -22,6 +22,10 @@ mealpy>=3.0 # PSO and other metaheuristics (Sudoku-05) # Graph networkx>=3.1 # Graph coloring (Sudoku-09) +# Automates symboliques (Sudoku-13) +regex>=2023.0 # Recursion (?&rec) absente du module re +dd>=0.6 # Diagrammes de decision binaires (dd.autoref) + # Deep Learning (Sudoku-16) torch>=2.0 diff --git a/README.md b/README.md index 0c22d38351..9fec8e401c 100644 --- a/README.md +++ b/README.md @@ -432,9 +432,9 @@ CoursIA/ ### Prérequis - Python 3.10+ avec pip -- .NET 9.0+ SDK (pour notebooks C# — .NET 10 LTS validé en local) +- .NET 9.0 SDK (notebooks C#) **et** .NET 10 SDK : `dotnet restore MyIA.CoursIA.sln` échoue sans le SDK 10, cinq projets de la solution ciblant `net10.0` (Aspire, démo Vibe-Coding) - VS Code avec extensions Python, Jupyter, .NET Interactive -- WSL (pour Lean et certains outils SymbolicAI) +- WSL sous Windows uniquement (pour Lean et certains outils SymbolicAI) ; sous Linux ou macOS, voir [setup-linux-macos.md](docs/reference/setup-linux-macos.md) - Docker + GPU (optionnel, pour GenAI avancé) ### Installation rapide diff --git a/docs/reference/kernels-runtime.md b/docs/reference/kernels-runtime.md index 96b908bcce..9a88f66dba 100644 --- a/docs/reference/kernels-runtime.md +++ b/docs/reference/kernels-runtime.md @@ -14,7 +14,7 @@ Notebooks dans `SymbolicAI/SemanticWeb/`, `SymbolicAI/SmartContract/`, `Search/` | Prerequis | Version | Verification | |-----------|---------|-------------| -| .NET SDK | 8.0 + 9.0 (10.0 optionnel) | `dotnet --list-sdks` | +| .NET SDK | 8.0 + 9.0 + 10.0 (10.0 requis par `dotnet restore MyIA.CoursIA.sln` : cinq projets `net10.0`) | `dotnet --list-sdks` | | dotnet-interactive | **1.0.617701** (verifie sur ai-01, cf ci-dessous) | `dotnet interactive --version` | | Jupyter kernels `.net-csharp`, `.net-fsharp`, `.net-powershell` | auto-installes | `jupyter kernelspec list` | diff --git a/docs/reference/setup-linux-macos.md b/docs/reference/setup-linux-macos.md index fb920b5f84..0ecab4f659 100644 --- a/docs/reference/setup-linux-macos.md +++ b/docs/reference/setup-linux-macos.md @@ -11,8 +11,14 @@ Pour les commandes spécifiques aux machines du cluster (paths `C:\Users\MYIA\.. Le SDK .NET et `dotnet-interactive` sont cross-OS : les notebooks `.net-csharp` s'exécutent à l'identique. ```bash -# Linux (Ubuntu/Debian) : dépôt Microsoft -sudo apt update && sudo apt install -y dotnet-sdk-9.0 +# Linux : script officiel Microsoft (installation dans ~/.dotnet, sans sudo). +# Les dépôts d'Ubuntu 24.04 LTS ne fournissent que dotnet-sdk-8.0 : +# `sudo apt install dotnet-sdk-9.0` y échoue (« Couldn't find any package »). +curl -sSL https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh +bash dotnet-install.sh --channel 9.0 +bash dotnet-install.sh --channel 10.0 # requis par `dotnet restore MyIA.CoursIA.sln` (projets net10.0) +export DOTNET_ROOT="$HOME/.dotnet" +export PATH="$DOTNET_ROOT:$DOTNET_ROOT/tools:$PATH" # à reporter dans ~/.bashrc # macOS : Homebrew Cask brew install --cask dotnet-sdk @@ -25,7 +31,7 @@ dotnet interactive --version # 1.0.617701 (pin, cf kernels-runtime.md) jupyter kernelspec list | grep ".net" # .net-csharp, .net-fsharp ``` -Le pin de version **1.0.617701** s'applique cross-OS (1.0.712001 casse `#!import` partout, pas seulement Windows). +Le pin de version **1.0.617701** s'applique cross-OS. La casse de `#!import` sous 1.0.712001, constatée sur ai-01, n'est pas reproduite partout : ni sur po-2024, ni sous Linux (Ubuntu 24.04, `#!import` exécuté sous les deux versions, [#17654](https://github.com/jsboige/CoursIA/issues/17654)). Le pin reste le standard tant que le dé-pin n'est pas décidé ([kernels-runtime.md](kernels-runtime.md)). ## Python 3.10+ + Conda @@ -49,16 +55,19 @@ Lean 4 s'installe via `elan` (cross-OS), équivalent de `rustup` pour Lean. **Pa ```bash curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -source $HOME/.cargo/env # ou relancer le shell +source $HOME/.elan/env # elan s'installe dans ~/.elan (pas ~/.cargo) ; ou relancer le shell elan toolchain install stable lean --version -# Kernel Jupyter Lean 4 +# Kernel Jupyter Lean 4 : le module d'installation est lean4_jupyter.install +# (`python -m lean4_jupyter.kernel install` ne fait rien et rend 0) pip install lean4-jupyter -python -m lean4_jupyter.kernel install +python -m lean4_jupyter.install --user ``` +> **Limite connue ([#17654](https://github.com/jsboige/CoursIA/issues/17654), D1).** Cette commande enregistre un kernel nommé `lean4`, alors que les notebooks Lean du dépôt déclarent `lean4-wsl`, et le chemin natif ne reprend ni la détection de la racine lake ni le lancement direct du REPL du wrapper Windows. Le parcours Lean n'est donc pas encore opérationnel de bout en bout sous Linux ou macOS. + ## Packages système courants Les READMEs de séries donnent parfois l'installation Windows-only (`winget`/`choco`). Équivalents : diff --git a/scripts/environment/audit_environment.ps1 b/scripts/environment/audit_environment.ps1 index 345e5899d0..3100ea2200 100644 --- a/scripts/environment/audit_environment.ps1 +++ b/scripts/environment/audit_environment.ps1 @@ -151,7 +151,7 @@ try { } else { Write-Check ".NET Interactive" "WARNING" "Non installé globalement" $Results.DotNet.Interactive = $false - $Results.Recommendations += "Installer .NET Interactive: dotnet tool install -g Microsoft.dotnet-interactive" + $Results.Recommendations += "Installer .NET Interactive: dotnet tool install -g Microsoft.dotnet-interactive --version 1.0.617701" } } catch { Write-Check ".NET Interactive" "WARNING" "Statut indéterminé" diff --git a/scripts/environment/audit_environment.sh b/scripts/environment/audit_environment.sh index c9eac870a5..c357deafc1 100755 --- a/scripts/environment/audit_environment.sh +++ b/scripts/environment/audit_environment.sh @@ -147,7 +147,7 @@ if command -v dotnet >/dev/null 2>&1; then write_check ".NET Interactive" "OK" "Installé globalement" else write_check ".NET Interactive" "WARNING" "Non installé globalement" - RECOMMENDATIONS+=("Installer .NET Interactive: dotnet tool install -g Microsoft.dotnet-interactive") + RECOMMENDATIONS+=("Installer .NET Interactive: dotnet tool install -g Microsoft.dotnet-interactive --version 1.0.617701") TOTAL_WARNINGS=$((TOTAL_WARNINGS + 1)) fi else diff --git a/scripts/environment/setup_environment.ps1 b/scripts/environment/setup_environment.ps1 index 4cdb6aed48..a1b11a3fd3 100644 --- a/scripts/environment/setup_environment.ps1 +++ b/scripts/environment/setup_environment.ps1 @@ -392,7 +392,7 @@ if ($AutoFix) { Save-Checkpoint "dotnet_interactive_install" } else { Write-Action "Installation de .NET Interactive..." "INFO" - dotnet tool install -g Microsoft.dotnet-interactive 2>&1 | Out-Null + dotnet tool install -g Microsoft.dotnet-interactive --version 1.0.617701 2>&1 | Out-Null if ($LASTEXITCODE -eq 0) { Write-Action ".NET Interactive installé avec succès" "SUCCESS" Save-Checkpoint "dotnet_interactive_install" diff --git a/scripts/environment/setup_environment.sh b/scripts/environment/setup_environment.sh index fb21720c34..5032ab2736 100755 --- a/scripts/environment/setup_environment.sh +++ b/scripts/environment/setup_environment.sh @@ -168,7 +168,7 @@ install_dotnet_interactive() { return 0 fi action "Installation de .NET Interactive..." "INFO" - if dotnet tool install -g Microsoft.dotnet-interactive >/dev/null 2>&1; then + if dotnet tool install -g Microsoft.dotnet-interactive --version 1.0.617701 >/dev/null 2>&1; then action ".NET Interactive installé avec succès" "SUCCESS" save_checkpoint "dotnet_interactive_install" # `dotnet tool install -g` places binaries in ~/.dotnet/tools; surface it if missing.