DeLaw_ollama / start.sh
Sadiksmart0's picture
Create start.sh
04fea66 verified
raw
history blame
356 Bytes
#!/bin/bash
# Start Ollama in the background
ollama serve &
# Wait for Ollama to be ready
until curl -s http://localhost:11434/api/tags >/dev/null; do
sleep 1
done
# Pull the model if not already present
if ! ollama list | grep -q "tinyllama"; then
ollama pull tinyllama
fi
# Start the FastAPI server
uvicorn app:app --host 0.0.0.0 --port 7860