papaduvalier commited on
Commit
a946f75
1 Parent(s): ab675b2

Create entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +21 -0
entrypoint.sh ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # Starting server
4
+ echo "Starting server"
5
+ ollama serve &
6
+ sleep 1
7
+
8
+ # Splitting the models by comma and pulling each
9
+ IFS=',' read -ra MODELS <<< "$model"
10
+ for m in "${MODELS[@]}"; do
11
+ echo "Pulling $m"
12
+ ollama pull "$m"
13
+ sleep 5
14
+ ollama pull "$m"
15
+ # echo "Running $m"
16
+ # ollama run "$m"
17
+ # No need to sleep here unless you want to give some delay between each pull for some reason
18
+ done
19
+
20
+ # Keep the script running to prevent the container from exiting
21
+ wait