File size: 701 Bytes
8b2f332
 
 
 
 
180cead
 
 
231afd2
 
 
 
 
 
 
 
 
 
180cead
8b2f332
 
 
 
 
180cead
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash

# Start ollama server
echo "Starting ollama server"
ollama serve &

# Wait for the ollama server to start
echo "Waiting for ollama server to start..."
while true; do
  if [ -f ~/.ollama/log.txt ]; then
    if grep -q "Listening on 127.0.0.1:11434" ~/.ollama/log.txt; then
      echo "ollama server started"
      break
    fi
  else
    echo "Log file not found. Waiting..."
    sleep 1
  fi
done

# Pull the phi3 model
echo "Pulling phi3 model"
ollama pull phi3

# Wait for the model to be pulled
echo "Waiting for model to be pulled..."
while ! ls /.ollama/models/phi3 > /dev/null 2>&1; do
  sleep 1
done
echo "Model pulled successfully"

# Run the start_app.sh script
bash start_app.sh