File size: 446 Bytes
4360442
 
42e16df
 
 
4360442
42e16df
4360442
 
 
 
 
 
 
 
 
 
 
f9b0345
 
 
 
4360442
1a1b743
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash

# Source the virtual environment
source /app/venv/bin/activate

# Starting server
echo "Starting Ollama 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
done


# Run the Python application
exec python ./run.py

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