cluster-state/modules/ollama/jobspec.nomad.hcl
Ben Martin 7a63a072b3
All checks were successful
Lint / lint (push) Successful in 1m39s
Terraform Plan and Apply / cicd (push) Successful in 1m17s
chore(ollama): add Ollama module and job specification
2025-03-20 01:06:49 +00:00

49 lines
765 B
HCL

job "ollama" {
group "ollama" {
network {
port "api" {
static = 11434
}
}
ephemeral_disk {
migrate = true
size = 5000
}
task "ollama" {
driver = "docker"
constraint {
attribute = "${node.unique.name}"
value = "Hestia"
}
config {
image = "ollama/ollama:latest"
runtime = "nvidia"
ports = ["api"]
volumes = [
"alloc/data/:/root/.ollama"
]
}
env {
NVIDIA_DRIVER_CAPABILITIES = "all"
NVIDIA_VISIBLE_DEVICES = "all"
}
resources {
cpu = 100
memory = 1024
}
}
service {
provider = "consul"
port = "api"
}
}
}