TEXTY / start.sh
Akash297's picture
Update start.sh
3afffcd verified
Raw History Blame Contribute Delete
512 Bytes
#!/bin/bash
# Create the necessary directory and set permissions for Ollama
mkdir -p /app/.ollama
chmod 777 /app/.ollama
# Start Ollama in the background
echo "Starting Ollama..."
ollama serve &
# Wait for Ollama to be ready
echo "Waiting for Ollama to be ready..."
until curl --silent --fail http://localhost:7860; do
echo "Waiting for Ollama to be ready..."
sleep 5
done
# Ollama is ready, now start Flask app
echo "Ollama is ready, starting Flask app..."
gunicorn -w 2 -b 0.0.0.0:7860 app.dip:app