Akash297 commited on
Commit
c3e2c3b
·
verified ·
1 Parent(s): 579d345

Update start.sh

Browse files
Files changed (1) hide show
  1. start.sh +8 -4
start.sh CHANGED
@@ -1,12 +1,16 @@
1
  #!/bin/bash
2
 
3
- # Wait for Ollama to start
4
- echo "Waiting for Ollama to start..."
 
 
 
 
5
  until curl --silent --fail http://localhost:7860; do
6
  echo "Waiting for Ollama to be ready..."
7
  sleep 5
8
  done
9
 
 
10
  echo "Ollama is ready, starting Flask app..."
11
- # Start the Flask app with Gunicorn
12
- gunicorn -w 2 -b 0.0.0.0:7860 app.dip:app
 
1
  #!/bin/bash
2
 
3
+ # Start Ollama in the background
4
+ echo "Starting Ollama..."
5
+ ollama serve &
6
+
7
+ # Wait for Ollama to be ready
8
+ echo "Waiting for Ollama to be ready..."
9
  until curl --silent --fail http://localhost:7860; do
10
  echo "Waiting for Ollama to be ready..."
11
  sleep 5
12
  done
13
 
14
+ # Ollama is ready, now start Flask app
15
  echo "Ollama is ready, starting Flask app..."
16
+ gunicorn -w 2 -b 0.0.0.0:7860 app.dip:app