42 lines
976 B
Bash
Executable File
42 lines
976 B
Bash
Executable File
#!/bin/bash
|
|
# Installation und Start Script für Mobile Wallpaper Processor
|
|
|
|
echo "🚀 Mobile Wallpaper Processor Setup"
|
|
echo "===================================="
|
|
|
|
# Prüfe Python
|
|
if ! command -v python3 &> /dev/null; then
|
|
echo "❌ Python3 ist nicht installiert"
|
|
exit 1
|
|
fi
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
# Virtuelle Umgebung erstellen
|
|
if [ ! -d "venv" ]; then
|
|
echo "📦 Erstelle virtuelle Umgebung..."
|
|
python3 -m venv venv
|
|
fi
|
|
|
|
# Aktivieren
|
|
source venv/bin/activate
|
|
|
|
# Abhängigkeiten installieren
|
|
echo "📥 Installiere Abhängigkeiten..."
|
|
pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
|
|
# Download OCR Model beim ersten Start
|
|
echo "🤖 Lade OCR Model herunter (einmalig)..."
|
|
python3 -c "import easyocr; easyocr.Reader(['de','en'], gpu=False)" 2>/dev/null || true
|
|
|
|
# Ordner erstellen
|
|
mkdir -p static/uploads static/downloads
|
|
|
|
echo ""
|
|
echo "✅ Installation abgeschlossen!"
|
|
echo ""
|
|
echo "Starte Server auf http://localhost:5000"
|
|
echo ""
|
|
python3 app.py
|