Generates bash scripts to install, configure, and start Ollama on vast.ai instances.
# Source: https://github.com/kstevica/captain-claw | License: MIT | Copyright 2026 Stevica Kuharski
# Provided via justclaw.it.com; keep this notice with the code.
"""Shell script templates for provisioning Ollama on vast.ai instances.
These scripts are passed as the ``onstart`` command when creating
a vast.ai instance. They run once after the container boots.
"""
from __future__ import annotations
def ollama_setup_script(
pre_pull_model: str = "",
secure: bool = True,
bearer_token: str = "",
) -> str:
"""Return a bash on-start script that installs and starts Ollama.
The script:
1. Installs Ollama via the official installer (skips if already present).
2. Starts ``ollama serve`` in the background.
3. Waits for the Ollama API to become healthy.
4. Op
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key