YussefGAFeer commited on
Commit
965ff20
·
verified ·
1 Parent(s): ee4b59f

Create start.sh

Browse files
Files changed (1) hide show
  1. start.sh +14 -0
start.sh ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ set -e
3
+
4
+ # Start Ollama in the background
5
+ nohup ollama serve > /dev/null 2>&1 &
6
+
7
+ # Wait for Ollama to be ready
8
+ until curl -s http://localhost:11434/api/tags > /dev/null; do
9
+ echo "Waiting for Ollama to start..."
10
+ sleep 1
11
+ done
12
+
13
+ # Start the FastAPI application
14
+ exec uvicorn app:app --host 0.0.0.0 --port 8000 --reload