bentebbutt commited on
Commit
3189358
·
verified ·
1 Parent(s): 231afd2

Update start_ollama.sh

Browse files
Files changed (1) hide show
  1. start_ollama.sh +3 -10
start_ollama.sh CHANGED
@@ -6,17 +6,10 @@ ollama serve &
6
 
7
  # Wait for the ollama server to start
8
  echo "Waiting for ollama server to start..."
9
- while true; do
10
- if [ -f ~/.ollama/log.txt ]; then
11
- if grep -q "Listening on 127.0.0.1:11434" ~/.ollama/log.txt; then
12
- echo "ollama server started"
13
- break
14
- fi
15
- else
16
- echo "Log file not found. Waiting..."
17
- sleep 1
18
- fi
19
  done
 
20
 
21
  # Pull the phi3 model
22
  echo "Pulling phi3 model"
 
6
 
7
  # Wait for the ollama server to start
8
  echo "Waiting for ollama server to start..."
9
+ while ! lsof -i :11434 > /dev/null; do
10
+ sleep 1
 
 
 
 
 
 
 
 
11
  done
12
+ echo "ollama server started"
13
 
14
  # Pull the phi3 model
15
  echo "Pulling phi3 model"