File size: 619 Bytes
184c989
 
f467230
 
55460df
184c989
 
 
c78218b
f467230
184c989
f467230
c78218b
c92c83e
184c989
f467230
77a34d8
 
1e862f1
 
 
f467230
6a69a20
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

# Ensure OLLAMA_HOME is set
export OLLAMA_HOME=/home/appuser/.ollama

# Start the Ollama server in the background
ollama serve &

# Wait for Ollama to initialize (this is arbitrary; you might tune it)
sleep 10

# (Optional) Preload the Hugging Face model
# Uncomment the line below if desired to warm up the model in Ollama
ollama run hf.co/abanm/Dubs-Q8_0-GGUF &

# Navigate to the application directory
cd /app


curl http://localhost:11434/api/generate -d '{"model": "hf.co/abanm/Dubs-Q8_0-GGUF:latest", "keep_alive": -1}'

# Start the FastAPI app using Uvicorn
uvicorn app:app --host 0.0.0.0 --port 7860