abanm/Backend_1
0
1#!/bin/sh2 3# Ensure OLLAMA_HOME is set4export OLLAMA_HOME=/home/appuser/.ollama5 6# Start the Ollama server in the background7ollama serve &8 9# Wait for Ollama to initialize (this is arbitrary; you might tune it)10sleep 1011 12# (Optional) Preload the Hugging Face model13# Uncomment the line below if desired to warm up the model in Ollama14ollama run hf.co/abanm/Dubs-Q8_0-GGUF &15 16# Navigate to the application directory17cd /app18 19 20curl http://localhost:11434/api/generate -d '{"model": "hf.co/abanm/Dubs-Q8_0-GGUF:latest", "keep_alive": -1}'21 22# Start the FastAPI app using Uvicorn23uvicorn app:app --host 0.0.0.0 --port 786024 