guydffdsdsfd commited on
Commit
86a3f94
·
verified ·
1 Parent(s): b528bb3

Update start.sh

Browse files
Files changed (1) hide show
  1. start.sh +11 -6
start.sh CHANGED
@@ -1,13 +1,18 @@
1
  #!/bin/bash
2
 
3
- # Start the Ollama server in the background
4
  ollama serve &
5
 
6
- # Wait for it to wake up
7
- sleep 10
8
 
9
- # Download the model
 
 
 
 
10
  ollama pull phi3
 
11
 
12
- # Keep the script alive so the container doesn't close
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