devve1 commited on
Commit
2740874
1 Parent(s): f3c253c

Create entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +23 -0
entrypoint.sh ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ source /app/venv/bin/activate
4
+
5
+ echo "Starting Ollama server"
6
+ ollama serve &
7
+ sleep 1
8
+
9
+ if [ -n "${MODEL}" ]; then
10
+ IFS=',' read -ra MODELS <<< "${MODEL}"
11
+ else
12
+ MODELS=()
13
+ fi
14
+
15
+
16
+ for m in "${MODELS[@]}"; do
17
+ echo "Pulling $m"
18
+ ollama pull "$m"
19
+ sleep 5
20
+ done
21
+
22
+
23
+ exec streamlit run ./run.py