Spaces:
Build error
Build error
Update start_ollama.sh
Browse files- start_ollama.sh +10 -3
start_ollama.sh
CHANGED
@@ -6,10 +6,17 @@ ollama serve &
|
|
6 |
|
7 |
# Wait for the ollama server to start
|
8 |
echo "Waiting for ollama server to start..."
|
9 |
-
while
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
done
|
12 |
-
echo "ollama server started"
|
13 |
|
14 |
# Pull the phi3 model
|
15 |
echo "Pulling phi3 model"
|
|
|
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"
|