MarneMorgan commited on
Commit
68476cf
·
verified ·
1 Parent(s): 3675117

Create entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +18 -0
entrypoint.sh ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # Start Ollama in the background
4
+ ollama serve &
5
+
6
+ # Wait for the server to wake up
7
+ echo "Waiting for Ollama server to start..."
8
+ while ! curl -s localhost:7860/api/tags > /dev/null; do
9
+ sleep 2
10
+ done
11
+
12
+ # Pull the 1B model (fastest on free CPU hardware)
13
+ echo "Pulling Llama 3.2 1B model..."
14
+ ollama pull llama3.2:1b
15
+
16
+ echo "API is ready!"
17
+ # Keep the process running
18
+ wait