bentebbutt commited on
Commit
180cead
·
verified ·
1 Parent(s): 5e975e2

Update start_ollama.sh

Browse files
Files changed (1) hide show
  1. start_ollama.sh +16 -4
start_ollama.sh CHANGED
@@ -3,12 +3,24 @@
3
  # Start ollama server
4
  echo "Starting ollama server"
5
  ollama serve &
6
- sleep 1
 
 
 
 
 
 
7
 
8
  # Pull the phi3 model
9
  echo "Pulling phi3 model"
10
  ollama pull phi3
11
- sleep 5
12
 
13
- # Run the run.sh script
14
- bash run.sh
 
 
 
 
 
 
 
 
3
  # Start ollama server
4
  echo "Starting ollama server"
5
  ollama serve &
6
+
7
+ # Wait for the ollama server to start
8
+ echo "Waiting for ollama server to start..."
9
+ while ! nc -z localhost 11434; do
10
+ sleep 1
11
+ done
12
+ echo "ollama server started"
13
 
14
  # Pull the phi3 model
15
  echo "Pulling phi3 model"
16
  ollama pull phi3
 
17
 
18
+ # Wait for the model to be pulled
19
+ echo "Waiting for model to be pulled..."
20
+ while ! ls /.ollama/models/phi3 > /dev/null 2>&1; do
21
+ sleep 1
22
+ done
23
+ echo "Model pulled successfully"
24
+
25
+ # Run the start_app.sh script
26
+ bash start_app.sh