zhengr commited on
Commit
5ad3a62
1 Parent(s): 37328b8

Update entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +8 -10
entrypoint.sh CHANGED
@@ -6,17 +6,15 @@ 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
- # echo "Running $m"
15
- # ollama run "$m" --keepalive -1s
16
  # No need to sleep here unless you want to give some delay between each pull for some reason
17
- #done
18
-
19
- ollama run "${MODELS}" --keepalive -1s
20
 
21
  # Keep the script running to prevent the container from exiting
22
  #wait
 
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
+ echo "Running $m"
15
+ ollama run "$m" --keepalive -1s
16
  # No need to sleep here unless you want to give some delay between each pull for some reason
17
+ done
 
 
18
 
19
  # Keep the script running to prevent the container from exiting
20
  #wait