#!/bin/bash # 1. Start Ollama in the background echo "Starting Ollama..." ollama serve & # 2. Wait for Ollama to initialize (give it a few seconds) sleep 10 # 3. Pull the model (this only downloads once if already present) echo "Pulling model: llama3.2:1b..." ollama pull llama3.2:1b # 4. Start the FastAPI server echo "Starting FastAPI backend..." uvicorn app:app --host 0.0.0.0 --port 7860