test_ollama / entrypoint.sh
myyim's picture
Update entrypoint.sh
5e0251e verified
raw
history blame contribute delete
391 Bytes
#!/bin/bash
# Start Ollama server in the background
echo "ollama"
ollama serve &
# Wait for the server to be ready
while ! nc -z localhost 7860; do
echo "Waiting for Ollama server to start..."
sleep 1
done
# Pull the model
echo "Pulling the model..."
ollama pull gemma3:4b
# Keep the container running
wait
# Start Uvicorn server
exec uvicorn main:app --host 0.0.0.0 --port 7860