101 lines
1.5 KiB
Markdown
101 lines
1.5 KiB
Markdown
# Guía de IA local con Ollama
|
|
|
|
Ollama permite ejecutar modelos de lenguaje localmente sin depender de servicios externos.
|
|
|
|
## 1. Instalar Ollama
|
|
|
|
### macOS
|
|
|
|
```bash
|
|
curl -fsSL https://ollama.com/install.sh | sh
|
|
```
|
|
|
|
O con Homebrew:
|
|
|
|
```bash
|
|
brew install ollama
|
|
```
|
|
|
|
### Linux
|
|
|
|
```bash
|
|
curl -fsSL https://ollama.com/install.sh | sh
|
|
```
|
|
|
|
### Windows
|
|
|
|
```powershell
|
|
irm https://ollama.com/install.ps1 | iex
|
|
```
|
|
|
|
---
|
|
|
|
## 2. Instalar modelos
|
|
|
|
```bash
|
|
ollama pull qwen3:8b
|
|
```
|
|
|
|
Modelos comunes:
|
|
|
|
```bash
|
|
ollama run llama3.2
|
|
ollama run qwen3
|
|
ollama run gemma3
|
|
ollama run mistral
|
|
```
|
|
|
|
Listar modelos:
|
|
|
|
```bash
|
|
ollama list
|
|
```
|
|
|
|
Salir del modo interactivo:
|
|
|
|
```text
|
|
/bye
|
|
```
|
|
|
|
---
|
|
|
|
## 3. Interfaz Web con Open WebUI
|
|
|
|
### Docker
|
|
|
|
```bash
|
|
docker run -d \
|
|
-p 3000:8080 \
|
|
--add-host=host.docker.internal:host-gateway \
|
|
-v open-webui:/app/backend/data \
|
|
--name open-webui \
|
|
ghcr.io/open-webui/open-webui:main
|
|
```
|
|
|
|
### Docker Compose
|
|
|
|
```yaml
|
|
services:
|
|
open-webui:
|
|
image: ghcr.io/open-webui/open-webui:main
|
|
container_name: open-webui
|
|
ports:
|
|
- "3000:8080"
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
environment:
|
|
- OLLAMA_BASE_URL=http://host.docker.internal:11434
|
|
volumes:
|
|
- open-webui:/app/backend/data
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
open-webui:
|
|
```
|
|
|
|
---
|
|
|
|
## 4. Resumen
|
|
|
|
Con Ollama puedes ejecutar IA localmente, probar modelos diferentes y usar una interfaz web para trabajar sin depender exclusivamente de servicios en la nube.
|