From 356b8d4c499cb3f43853038b0203da75144b7775 Mon Sep 17 00:00:00 2001 From: ramseshk <45832522+ramseshk@users.noreply.github.com> Date: Tue, 11 Aug 2026 15:49:30 +0800 Subject: [PATCH] Add run_dashboard.sh launcher script + auto warehouse export - run_dashboard.sh: one-command launcher with auto warehouse export - Sets correct working directory and streamlit flags - All 49 tests passing. 344 dataset files committed. --- run_dashboard.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 run_dashboard.sh diff --git a/run_dashboard.sh b/run_dashboard.sh new file mode 100755 index 0000000..15e870a --- /dev/null +++ b/run_dashboard.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# Fantabeto 26/27 Dashboard Launcher +# Usage: ./run_dashboard.sh [port] +set -e + +PORT=${1:-8501} +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" + +echo "============================================" +echo " Fantabeto 26/27 — Project Al-Cihred" +echo " Dashboard starting on port $PORT" +echo "============================================" +echo "" + +# Export warehouse if needed +if [ ! -f "$SCRIPT_DIR/data/warehouse/players.parquet" ]; then + echo "[init] Exporting warehouse data..." + python -m src.export.warehouse + echo "" +fi + +echo "[server] Starting Streamlit..." +echo " Local: http://localhost:$PORT" +echo " Network: http://$(hostname -I | awk '{print $1}'):$PORT" +echo "" +echo "Press Ctrl+C to stop." +echo "" + +cd "$SCRIPT_DIR" +exec python -m streamlit run dashboard/app.py \ + --server.port "$PORT" \ + --server.headless true \ + --server.enableStaticServing true