File size: 520 Bytes
f8f0d48
 
 
 
 
 
 
 
 
 
 
d855631
f8f0d48
 
c2c613f
f8f0d48
 
 
d38a01b
150fab6
f8f0d48
919ae43
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

# Starting server
echo "Starting server"
ollama serve &
sleep 1

# Splitting the models by comma and pulling each
IFS=',' read -ra MODELS <<< "$model"
for m in "${MODELS[@]}"; do
    echo "Pulling $m"
    ollama pull "$m"
    sleep 5
    echo "Running $m"
    ollama run "$m"  --keepalive -1s
    # No need to sleep here unless you want to give some delay between each pull for some reason
done

litellm --model ollama/"$m" --drop_params

# Keep the script running to prevent the container from exiting
wait