« 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
 
(Une version intermédiaire par le même utilisateur non affichée)
Ligne 11 : Ligne 11 :
  '''systemctl daemon-reload;systemctl restart ollama'''
  '''systemctl daemon-reload;systemctl restart ollama'''


  Exemple pour tester ollama:
  Exemples pour tester ollama:
  '''curl http://51.83.2.131:11434/api/tags'''
  '''curl http://51.83.2.131:11434/api/tags''' ''Pour écouter OVH1 sur le port natif (11434)''
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 OVH1 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

Dernière version du 24 mars 2025 à 11:02

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
Exemples pour tester ollama:
curl http://51.83.2.131:11434/api/tags Pour écouter OVH1 sur le port natif (11434)
 ou
curl http://51.83.2.131:12345/api/tags Pour écouter OVH1 sur un autre port
Ref: https://www.linuxtricks.fr/wiki/ia-installer-un-modele-de-langage-llm-avec-ollama