Documentation
¶
Overview ¶
Command pasture keeps a library of Ollama models larger than the disk. It runs in front of Ollama on Ollama's port, moves the least recently used models away when they outgrow the budget, and brings a model back when a request asks for it. See README.md for its commands.
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
archive
Package archive keeps full copies of moved-away models in the archive folder, in the layout of Ollama's models folder, and copies them back.
|
Package archive keeps full copies of moved-away models in the archive folder, in the layout of Ollama's models folder, and copies them back. |
|
cli
Package cli runs the pasture command: each subcommand, and `pasture serve`, which starts `ollama serve` behind the proxy and keeps the library within its budget.
|
Package cli runs the pasture command: each subcommand, and `pasture serve`, which starts `ollama serve` behind the proxy and keeps the library within its budget. |
|
client
Package client sends the pasture command's requests to the running `pasture serve`, with the admin token.
|
Package client sends the pasture command's requests to the running `pasture serve`, with the admin token. |
|
config
Package config reads and writes pasture's config file and state file, and names where pasture keeps its files.
|
Package config reads and writes pasture's config file and state file, and names where pasture keeps its files. |
|
disk
Package disk measures the space that models take and the space left on the disk that holds them, the way df measures it on each system.
|
Package disk measures the space that models take and the space left on the disk that holds them, the way df measures it on each system. |
|
fakeollama
Package fakeollama stands in for `ollama serve` in tests.
|
Package fakeollama stands in for `ollama serve` in tests. |
|
files
Package files writes and copies files so that the result is on the disk before a call returns: through a temporary file and a rename, with each new folder entry synced.
|
Package files writes and copies files so that the result is on the disk before a call returns: through a temporary file and a rename, with each new folder entry synced. |
|
harness
Package harness wires a Manager, its proxy, and the node link to a fake Ollama for tests, and holds the helpers that the tests of several packages share.
|
Package harness wires a Manager, its proxy, and the node link to a fake Ollama for tests, and holds the helpers that the tests of several packages share. |
|
library
Package library keeps a library of Ollama models within a disk budget.
|
Package library keeps a library of Ollama models within a disk budget. |
|
model
Package model names Ollama models and reads their manifests, and asks a model's registry what it serves.
|
Package model names Ollama models and reads their manifests, and asks a model's registry what it serves. |
|
node
Package node pairs this machine with a Cinchapi account, keeps the link to the account open while paired, and serves HTTPS with API keys on a server with a public name.
|
Package node pairs this machine with a Cinchapi account, keeps the link to the account open while paired, and serves HTTPS with API keys on a server with a public name. |
|
ollama
Package ollama talks to the `ollama serve` that pasture runs behind its proxy, and downloads Ollama when no ollama command is installed.
|
Package ollama talks to the `ollama serve` that pasture runs behind its proxy, and downloads Ollama when no ollama command is installed. |
|
onboard
Package onboard suggests local models for the machine and the work it will do.
|
Package onboard suggests local models for the machine and the work it will do. |
|
service
Package service sets up the service that runs `pasture serve`: a launchd job on macOS or a systemd user unit on Linux, and the log files.
|
Package service sets up the service that runs `pasture serve`: a launchd job on macOS or a systemd user unit on Linux, and the log files. |
|
term
Package term holds the pasture command's helpers for the terminal: questions, arguments, how long ago a time was, and waits.
|
Package term holds the pasture command's helpers for the terminal: questions, arguments, how long ago a time was, and waits. |