« Info::IA:ollama écoute autrement que sur localhost » : différence entre les versions
De wiki_pcwiki2
Aller à la navigationAller à la recherche
Aucun résumé des modifications |
Aucun résumé des modifications |
||
| Ligne 4 : | Ligne 4 : | ||
Si l'on veut que ollama écoute sur toutes les interfaces réseau: | Si l'on veut que ollama écoute sur toutes les interfaces réseau: | ||
Editer le fichier /etc/systemd/system/ollama.service et rajouter OLLAMA_HOST: | Editer le fichier /etc/systemd/system/ollama.service et rajouter OLLAMA_HOST: | ||
Environment="OLLAMA_HOST=0.0.0.0" | '''Environment="OLLAMA_HOST=0.0.0.0"''' | ||
ou | ou | ||
Environment="OLLAMA_HOST=0.0.0.0:12345" ''Pour écouter sur un autre port'' | '''Environment="OLLAMA_HOST=0.0.0.0:12345"''' ''Pour écouter sur un autre port'' | ||
Ensuite: | Ensuite: | ||
systemctl daemon-reload;systemctl restart ollama | '''systemctl daemon-reload;systemctl restart ollama''' | ||
Exemple pour tester ollama: | Exemple pour tester ollama: | ||
curl http://51.83.2.131:11434/api/tags | '''curl http://51.83.2.131:11434/api/tags''' | ||
ou | ou | ||
curl http://51.83.2.131:12345/api/tags ''Pour écouter sur un autre port'' | '''curl http://51.83.2.131:12345/api/tags''' ''Pour écouter sur un autre port'' | ||
Ref: https://www.linuxtricks.fr/wiki/ia-installer-un-modele-de-langage-llm-avec-ollama | Ref: https://www.linuxtricks.fr/wiki/ia-installer-un-modele-de-langage-llm-avec-ollama | ||
Version du 24 mars 2025 à 11:01
KEYWORDS: OLLAMA, LISTEN, LOCALHOST, 0.0.0.0
Le 24/03/2025: Si l'on veut que ollama écoute sur toutes les interfaces réseau: Editer le fichier /etc/systemd/system/ollama.service et rajouter OLLAMA_HOST: Environment="OLLAMA_HOST=0.0.0.0" ou Environment="OLLAMA_HOST=0.0.0.0:12345" Pour écouter sur un autre port Ensuite: systemctl daemon-reload;systemctl restart ollama
Exemple pour tester ollama: curl http://51.83.2.131:11434/api/tags ou curl http://51.83.2.131:12345/api/tags Pour écouter sur un autre port
Ref: https://www.linuxtricks.fr/wiki/ia-installer-un-modele-de-langage-llm-avec-ollama