ash-171 commited on
Commit
bc0d655
·
verified ·
1 Parent(s): 5f313ea

Create start.sh

Browse files
Files changed (1) hide show
  1. start.sh +19 -0
start.sh ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ echo "Starting Ollama server in background..."
4
+ ollama serve &
5
+
6
+ echo "Waiting for Ollama to initialize..."
7
+ sleep 10
8
+
9
+ until curl -s http://localhost:11434/api/tags > /dev/null; do
10
+ echo "Ollama not ready yet, waiting..."
11
+ sleep 5
12
+ done
13
+ echo "Ollama is ready!"
14
+
15
+ echo "Starting Streamlit app..."
16
+ streamlit run streamlit_app.py --server.port=8501 --server.enableCORS=false --server.enableXsrfProtection=false
17
+
18
+ # Keep the script running so the container doesn't exit if streamlit dies
19
+ wait