| servidor |
|
127.0.0.1
systemctl start ollama.service
|
192.168.1.151
systemctl edit ollama.service
[Service]
Environment="OLLAMA_HOST=0.0.0.0"
systemctl start ollama.service
|
client local
|
ollama |
|
|
|
Open WebUI |
Instal·lació (Docker)
docker run -d --network=host
\
-e
OLLAMA_BASE_URL=http://127.0.0.1:11434
\
-v open-webui:/app/backend/data \
--name open-webui \
--restart always
ghcr.io/open-webui/open-webui:main
|
|
| client remot |
ollama |
|
OLLAMA_HOST=192.168.1.151:11434
ollama
OLLAMA_HOST=192.168.1.151:11434
ollama launch opencode
|
|
curl |
|
curl
http://192.168.1.151:11434/api/tags
curl
http://192.168.1.151:11434/api/generate
-d '{
"model": "gemma4:e4b",
"prompt": "Hola!"
}'
|
|
Open WebUI |
|
- Instal·lació (Docker)
docker run -d -p 3000:8080 \
-e
OLLAMA_BASE_URL=http://192.168.1.151:11434
\
-v
open-webui:/app/backend/data \
--name open-webui \
--restart always \
ghcr.io/open-webui/open-webui:main
- Ús
|