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

46
scripts/start-with-gpu.sh Executable file
View File

@@ -0,0 +1,46 @@
#!/bin/bash
# Script to start Docker Compose with GPU support if available
echo "Munich News - GPU Detection & Startup"
echo "======================================"
echo ""
# Check if nvidia-smi is available
if command -v nvidia-smi &> /dev/null; then
echo "✓ NVIDIA GPU detected!"
nvidia-smi --query-gpu=name,driver_version,memory.total --format=csv,noheader
echo ""
# Check if nvidia-docker runtime is available
if docker run --rm --gpus all nvidia/cuda:12.0.0-base-ubuntu22.04 nvidia-smi &> /dev/null; then
echo "✓ NVIDIA Docker runtime is available"
echo ""
echo "Starting services with GPU support..."
docker compose -f docker-compose.yml -f docker-compose.gpu.yml up -d
echo ""
echo "✓ Services started with GPU acceleration!"
echo ""
echo "To verify GPU is being used by Ollama:"
echo " docker exec munich-news-ollama nvidia-smi"
else
echo "⚠ NVIDIA Docker runtime not found!"
echo ""
echo "To enable GPU support, install nvidia-container-toolkit:"
echo " https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html"
echo ""
echo "Starting services without GPU support..."
docker-compose up -d
fi
else
echo " No NVIDIA GPU detected"
echo "Starting services with CPU-only mode..."
docker-compose up -d
fi
echo ""
echo "Services are starting. Check status with:"
echo " docker-compose ps"
echo ""
echo "View logs:"
echo " docker-compose logs -f ollama"