mirror of
https://github.com/tiennm99/composes.git
synced 2026-10-13 00:14:21 +00:00
docs: expand README — features table, GPU notes, smoke test
This commit is contained in:
1 parent
28cf2bd1f9
commit
2752b8fb5a
1 file changed
+39
-2
+39
-2
@@ -1,6 +1,8 @@
|
||||
# ollama-docker-compose
|
||||
|
||||
Docker Compose setup for running [Ollama](https://ollama.com) (optionally with a web UI) locally.
|
||||
Minimal Docker Compose setup for running [Ollama](https://ollama.com) locally — exposes the API on `:11434` with a named volume so pulled models persist across restarts.
|
||||
|
||||
> The "optionally with a web UI" phrase from the description is **not yet wired**. Open Web UI sidecar can be added — see [Roadmap](#roadmap).
|
||||
|
||||
## Quick start
|
||||
|
||||
@@ -8,12 +10,47 @@ Docker Compose setup for running [Ollama](https://ollama.com) (optionally with a
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Ollama API at `http://localhost:11434`. Pull a model:
|
||||
Ollama API → `http://localhost:11434`.
|
||||
|
||||
Pull a model:
|
||||
|
||||
```bash
|
||||
docker compose exec ollama ollama pull llama3.2
|
||||
```
|
||||
|
||||
Chat from CLI:
|
||||
|
||||
```bash
|
||||
docker compose exec ollama ollama run llama3.2
|
||||
```
|
||||
|
||||
Smoke test via API:
|
||||
|
||||
```bash
|
||||
curl http://localhost:11434/api/generate -d '{
|
||||
"model": "llama3.2",
|
||||
"prompt": "Why is the sky blue?",
|
||||
"stream": false
|
||||
}'
|
||||
```
|
||||
|
||||
## What's inside
|
||||
|
||||
| Field | Value |
|
||||
|---|---|
|
||||
| Image | `ollama/ollama` (latest) |
|
||||
| Port | `11434:11434` |
|
||||
| Volume | `ollama:/root/.ollama` (models, manifests) |
|
||||
| Restart policy | `unless-stopped` |
|
||||
|
||||
## GPU
|
||||
|
||||
To enable GPU, add `deploy.resources.reservations.devices` for the NVIDIA runtime — see the [Ollama Docker docs](https://hub.docker.com/r/ollama/ollama). CPU-only by default.
|
||||
|
||||
## Roadmap
|
||||
|
||||
- Add Open Web UI sidecar (`ghcr.io/open-webui/open-webui:main`) on `:3000` wired to this Ollama instance.
|
||||
|
||||
## License
|
||||
|
||||
Apache-2.0
|
||||
Reference in new issue
Block a user