You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1007 B

1 month ago
  1. #!/bin/bash
  2. # Kronos Web UI startup script
  3. echo "🚀 Starting Kronos Web UI..."
  4. echo "================================"
  5. # Check if Python is installed
  6. if ! command -v python3 &> /dev/null; then
  7. echo "❌ Python3 not installed, please install Python3 first"
  8. exit 1
  9. fi
  10. # Check if in correct directory
  11. if [ ! -f "app.py" ]; then
  12. echo "❌ Please run this script in the webui directory"
  13. exit 1
  14. fi
  15. # Check dependencies
  16. echo "📦 Checking dependencies..."
  17. if ! python3 -c "import flask, flask_cors, pandas, numpy, plotly" &> /dev/null; then
  18. echo "⚠️ Missing dependencies, installing..."
  19. pip3 install -r requirements.txt
  20. if [ $? -ne 0 ]; then
  21. echo "❌ Dependencies installation failed"
  22. exit 1
  23. fi
  24. echo "✅ Dependencies installation completed"
  25. else
  26. echo "✅ All dependencies installed"
  27. fi
  28. # Start application
  29. echo "🌐 Starting Web server..."
  30. echo "Access URL: http://localhost:7070"
  31. echo "Press Ctrl+C to stop server"
  32. echo ""
  33. python3 app.py