Ollama — run open large language models (Llama, Mistral, Gemma, Qwen, and more) locally behind a simple REST API. Deployed as a host-networked Nomad service with a persistent Docker volume for downloaded models.
Save as values.hcl, edit, then run:
# The name of the Nomad job.
job_name = "ollama"
# The Nomad namespace to deploy into.
namespace = "default"
# The datacenters to deploy to.
datacenters = ["*"]
# The Ollama container image. Pin a tag in production.
image = "ollama/ollama:latest"
# Host port for the Ollama REST API.
port = 11434
# Docker named volume for /root/.ollama (downloaded models — these can be many GB). Ollama runs as root, so a fresh volume is writable. Back it up (or just re-pull models).
data_volume = "ollama_data"
# Placement constraints — pin to one node so the local model volume stays put (and so you land on a node with enough RAM/CPU or a GPU). On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []
# The task resources. LLMs are hungry — raise cpu/memory substantially for real models (7B+ needs several GB of RAM on CPU).
resources = {
cpu = 2000
memory = 4096
}
| Name | Type | Default | Description |
|---|---|---|---|
| job_name | string | "ollama" | The name of the Nomad job. |
| namespace | string | "default" | The Nomad namespace to deploy into. |
| datacenters | list | ["*"] | The datacenters to deploy to. |
| image | string | "ollama/ollama:latest" | The Ollama container image. Pin a tag in production. |
| port | number | 11434 | Host port for the Ollama REST API. |
| data_volume | string | "ollama_data" | Docker named volume for /root/.ollama (downloaded models — these can be many GB). Ollama runs as root, so a fresh volume is writable. Back it up (or just re-pull models). |
| constraints | list | [] | Placement constraints — pin to one node so the local model volume stays put (and so you land on a node with enough RAM/CPU or a GPU). On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true". |
| resources | object | {
cpu = 2000
memory = 4096
} | The task resources. LLMs are hungry — raise cpu/memory substantially for real models (7B+ needs several GB of RAM on CPU). |
No variables match.
Ollama — run open large language models (Llama, Mistral, Gemma, Qwen, DeepSeek, …) locally behind a simple REST API. Host-networked Nomad service with a persistent volume for downloaded models.
nomad-pack registry add nomploy github.com/Nomploy/nomad-packs
nomad-pack run ollama --registry nomploy
In nomploy: create a Compose service, type Nomad Pack, pack ollama, custom registry
github.com/Nomploy/nomad-packs, then Deploy.
curl http://<node-ip>:11434/api/pull -d '{"name":"llama3.2"}'
curl http://<node-ip>:11434/api/generate -d '{"model":"llama3.2","prompt":"hi"}'
| Variable | Default | Notes |
|---|---|---|
image |
ollama/ollama:latest |
Pin a tag in production. |
port |
11434 |
REST API (OLLAMA_HOST). |
data_volume |
ollama_data |
Downloaded models (can be many GB). |
constraints |
[] |
Pin to a node with enough RAM (or a GPU) and to keep the model volume. |
resources |
cpu 2000 / mem 4096 |
Raise substantially for real models — a 7B model needs several GB of RAM on CPU. |
count is fixed to 1 (local model volume). Pin with constraints to a
node that has the resources.device "nvidia/gpu"), which isn't set here.http://<node-ip>:11434.