#!/bin/bash echo "Checking for models..." # Ensure we're using the right home directory export HOME=/root # Check if Ollama is running if ! pgrep -x "ollama" > /dev/null then echo "Ollama is not running. Starting Ollama..." ollama serve & sleep 5 fi # Try to pull the model echo "Pulling phi2 model..." ollama pull phi2