#!/bin/sh # Preseed Ollama with the models the stack should have available at startup. # Runs once via the model-init service (see docker-compose.yml). Safe to # re-run — already-present models are skipped. # # Add or remove tags to taste. The host needs enough disk for everything # listed; check sizes at https://ollama.com/library before adding. set -e MODELS="dolphin3:8b llama3.1:8b ministral-3:8b mistral-nemo:12b qwen3.6:latest" for model in $MODELS; do if ollama list | awk 'NR>1 {print $1}' | grep -qx "$model"; then echo "✓ $model already present" else echo "→ Pulling $model…" ollama pull "$model" fi done echo "Done."