galactromedaNPMAIECOSYSTEM commited on
Commit
658fe13
·
verified ·
1 Parent(s): 1182bf8

Upload entrypoint.sh with huggingface_hub

Browse files
Files changed (1) hide show
  1. entrypoint.sh +16 -0
entrypoint.sh ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ set -e
3
+
4
+ export OLLAMA_HOST="127.0.0.1:11434"
5
+
6
+ ollama serve &
7
+ echo "Waiting for Ollama..."
8
+
9
+ while ! nc -z localhost 11436 || ! nc -z localhost 11435; do
10
+ sleep 1
11
+ done
12
+
13
+ ollama pull vicuna:7b
14
+
15
+ echo "Starting FastAPI..."
16
+ exec python3 -m uvicorn main:app --host 0.0.0.0 --port ${PORT:-7860}