Spaces:
Sleeping
Sleeping
File size: 785 Bytes
02c0be9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #!/usr/bin/env bash
# Entry point for HF Spaces Docker deployment.
# 1. Ensure /data sub-dirs exist (in case persistent volume is empty)
# 2. Run bootstrap ingestion (re-index any docs in /data/documents that ChromaDB doesn't know about)
# 3. Start Streamlit
set -euo pipefail
mkdir -p "${DOCUMENTS_DIR:-/data/documents}" \
"${PROCESSED_DIR:-/data/processed}" \
"${CHROMA_DIR:-/data/chroma_db}"
echo "[start] running bootstrap ingestion..."
python -m scripts.bootstrap || echo "[start] bootstrap finished with warnings (non-fatal)"
echo "[start] launching Streamlit on port ${STREAMLIT_SERVER_PORT:-7860}"
exec streamlit run app/ui/streamlit_app.py \
--server.port "${STREAMLIT_SERVER_PORT:-7860}" \
--server.address "${STREAMLIT_SERVER_ADDRESS:-0.0.0.0}"
|