#!/bin/bash # Start the server in the background echo "Starting server" ollama serve & sleep 1 # Pull the specified model echo "Pulling $model" ollama pull $model # Wait a bit for the model to be ready sleep 5 # Run the specified model echo "Running $model" ollama run $model # Keep the script running to prevent the container from exiting # Adjust the command below as needed based on your application's behavior wait