Skip to content

Compose: give the optional Ollama service the GPU #2

Description

@mlmrx

The ollama service behind --profile ollama in docker-compose.yml has no GPU reservation, so a containerized Ollama runs on the CPU. The one-command trial avoids this by pointing at a host Ollama; the Compose path should not silently be slower.

Half-designed answer: add a deploy.resources.reservations.devices block with driver: nvidia, count: all, capabilities: [gpu] under the ollama service, guarded so hosts without the NVIDIA Container Toolkit still start (a Compose profile or an override file such as docker-compose.gpu.yml may be the honest shape). Update the comment block at the top of the file and the Docker paragraph in docs/OPERATIONS.md; test/infra.test.js renders the Compose config, so extend that test.

Done when: docker compose --profile ollama config shows the reservation, the non-GPU path still validates, and the docs say which is which.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions