Spaces:
Sleeping
Sleeping
| # Launch the Streamlit demo inside the Singularity container. | |
| # Usage: bash scripts/run_demo.sh [--port PORT] | |
| # Access: http://localhost:<PORT> (default: 8502) | |
| set -euo pipefail | |
| REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)" | |
| source "${REPO_ROOT}/.env" | |
| PORT=8502 | |
| while [[ $# -gt 0 ]]; do | |
| case "$1" in | |
| --port) PORT="$2"; shift 2 ;; | |
| *) echo "Unknown option: $1" >&2; exit 1 ;; | |
| esac | |
| done | |
| singularity run \ | |
| --bind "${DATA_ROOT}/data:${REPO_ROOT}/data" \ | |
| --bind "${DATA_ROOT}/index_store:${REPO_ROOT}/index_store" \ | |
| --bind "${HF_HOME}:${HF_HOME}" \ | |
| --env HF_HOME="${HF_HOME}" \ | |
| --env OPENAI_API_KEY="${OPENAI_API_KEY}" \ | |
| --env DATA_ROOT="${REPO_ROOT}" \ | |
| --env PYTHONPATH="${REPO_ROOT}" \ | |
| --pwd "${REPO_ROOT}" \ | |
| "${SIF_DIR}/response_quality.sif" \ | |
| streamlit run demo/app.py --server.port "${PORT}" | |