DeLaw_ollama / start.sh
Sadiksmart0's picture
Update start.sh
d0488d8 verified
raw
history blame
370 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 "mistral:instruct"; then
ollama pull mistral:instruct
fi
# Start the FastAPI server
uvicorn app:app --host 0.0.0.0 --port 7860