Spaces:
Build error
Build error
Create start.sh
Browse files
start.sh
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
set -e
|
| 3 |
+
|
| 4 |
+
# Start Ollama in the background
|
| 5 |
+
nohup ollama serve > /dev/null 2>&1 &
|
| 6 |
+
|
| 7 |
+
# Wait for Ollama to be ready
|
| 8 |
+
until curl -s http://localhost:11434/api/tags > /dev/null; do
|
| 9 |
+
echo "Waiting for Ollama to start..."
|
| 10 |
+
sleep 1
|
| 11 |
+
done
|
| 12 |
+
|
| 13 |
+
# Start the FastAPI application
|
| 14 |
+
exec uvicorn app:app --host 0.0.0.0 --port 8000 --reload
|