cleanup and ui change

This commit is contained in:
2025-11-16 20:59:14 +01:00
parent f0e552b1b1
commit 9f167a6534
15 changed files with 165 additions and 155 deletions

44
scripts/pull-ollama-model.sh Executable file
View File

@@ -0,0 +1,44 @@
#!/bin/bash
# Pull Ollama model from .env file
set -e
# Load OLLAMA_MODEL from .env
if [ -f backend/.env ]; then
export $(grep -v '^#' backend/.env | grep OLLAMA_MODEL | xargs)
else
echo "Error: backend/.env file not found"
exit 1
fi
# Default to phi3:latest if not set
MODEL=${OLLAMA_MODEL:-phi3:latest}
echo "=========================================="
echo "Pulling Ollama Model: $MODEL"
echo "=========================================="
echo ""
# Check if Ollama container is running
if ! docker-compose ps ollama | grep -q "Up"; then
echo "Error: Ollama container is not running"
echo "Start it with: docker-compose up -d ollama"
exit 1
fi
echo "Pulling model via Ollama API..."
echo ""
# Pull the model
docker-compose exec -T ollama ollama pull "$MODEL"
echo ""
echo "=========================================="
echo "✓ Model $MODEL pulled successfully!"
echo "=========================================="
echo ""
echo "Verify with:"
echo " docker-compose exec ollama ollama list"
echo ""
echo "Test with:"
echo " curl http://localhost:5001/api/ollama/test"