« Info::IA:script d'installation de open-webui » : différence entre les versions
De wiki_pcwiki2
Aller à la navigationAller à la recherche
Page créée avec « KEYWORDS: IA, OPEN-WEBUI, OLLAMA <nowiki> #!/bin/bash # mar. 28 oct. 2025 15:07:53 CET fnInstallOpen-webui() { mkdir /root/tmp.pip 2>/dev/null export TMPDIR=/root/tmp.pip... » |
Aucun résumé des modifications |
||
| Ligne 1 : | Ligne 1 : | ||
KEYWORDS: IA, OPEN-WEBUI, OLLAMA | KEYWORDS: IA, OPEN-WEBUI, OLLAMA | ||
<nowiki> | <pre><nowiki> | ||
#!/bin/bash | #!/bin/bash | ||
# mar. 28 oct. 2025 15:07:53 CET | # mar. 28 oct. 2025 15:07:53 CET | ||
| Ligne 51 : | Ligne 51 : | ||
# MAIN | # MAIN | ||
fnInstallOpen-webui | fnInstallOpen-webui | ||
</nowiki> | </nowiki></pre> | ||
Version du 28 octobre 2025 à 14:12
KEYWORDS: IA, OPEN-WEBUI, OLLAMA
#!/bin/bash
# mar. 28 oct. 2025 15:07:53 CET
fnInstallOpen-webui()
{
mkdir /root/tmp.pip 2>/dev/null
export TMPDIR=/root/tmp.pip
mkdir /root/IA 2>/dev/null
cd ~/IA
rm -rf open-webui
apt update && sudo apt upgrade -y
# Installer Python 3.11+ (Debian 12 devrait l'avoir par défaut)
apt install python3 python3-pip python3-venv git -y
# Installer Node.js (version 18+)
apt install nodejs -y
git clone https://github.com/open-webui/open-webui.git
chown -R $USER:$USER open-webui
cd open-webui/
python3 -m venv venv
source venv/bin/activate
# Installer les dépendances
pip install --upgrade pip
pip install -r backend/requirements.txt
npm install --legacy-peer-deps
npm install y-protocols --legacy-peer-deps
npm run build
# Générer une clé secrète
python3 -c "import secrets; print(secrets.token_hex(32))" > keyGenerated.txt
echo "\
# La clé générée ici est dans keyGenerated.txt\
WEBUI_SECRET_KEY=votre_cle_generee_ici
OLLAMA_BASE_URL=http://localhost:11434" >> .env
vi .env
ollama --version
pwd
ls
export PYTHONPATH=/root/IA/open-webui/backend:$PYTHONPATH
python backend/open_webui/main.py --host 0.0.0.0 --port 8080
}
# MAIN
fnInstallOpen-webui