Spaces:
Running
Running
Update start.sh
Browse files
start.sh
CHANGED
|
@@ -1,13 +1,18 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
|
| 3 |
-
# Start
|
| 4 |
ollama serve &
|
| 5 |
|
| 6 |
-
#
|
| 7 |
-
|
| 8 |
|
| 9 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
ollama pull phi3
|
|
|
|
| 11 |
|
| 12 |
-
#
|
| 13 |
-
wait
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
|
| 3 |
+
# Start Ollama in the background
|
| 4 |
ollama serve &
|
| 5 |
|
| 6 |
+
# Record the Process ID so we can wait for it later
|
| 7 |
+
pid=$!
|
| 8 |
|
| 9 |
+
# Wait for Ollama to wake up
|
| 10 |
+
sleep 5
|
| 11 |
+
|
| 12 |
+
# Pull the model (Change phi3 to llama3 if you want)
|
| 13 |
+
echo "🔴 Pulling model..."
|
| 14 |
ollama pull phi3
|
| 15 |
+
echo "🟢 Model ready!"
|
| 16 |
|
| 17 |
+
# Wait for the process to finish
|
| 18 |
+
wait $pid
|