This guide is for a fresh clone of VisoRAG.
Dev-only checks do not need a .env file. Real serving should always set VISORAG_API_TOKEN; placeholder values such as change-me or test_bearer_123 are not deployment values.
The default development install is lightweight. It verifies packaging, import safety, API contracts, notebook structure, and mocked tests. It does not download or run ColQwen2 or Qwen2.5-VL.
python -m pip install -e ".[dev]"
python scripts/check_notebook_contract.py
python scripts/smoke_import.py
python -m pytestThis proves the package and public contracts, not real model inference.
Real document question answering requires:
- Python 3.10 or newer.
- A CUDA-capable GPU runtime.
- The
.[gpu]optional dependency set. - Model downloads for
vidore/colqwen2-v1.0andQwen/Qwen2.5-VL-3B-Instruct. - Enough GPU memory for the selected image pixel bounds and document size.
Install the GPU dependencies only in a CUDA environment:
python -m pip install -e ".[gpu]"The notebook-origin workflow was designed around a Google Colab T4-style runtime. CPU execution is not a supported path for real Qwen2.5-VL generation.
DOCX files are converted through LibreOffice. Verify soffice is available before testing DOCX input:
soffice --versionIf that command fails, install LibreOffice and add its program directory to PATH. PDF and image inputs do not require LibreOffice.
macOS/Linux:
export VISORAG_API_TOKEN="change-me"
python -m visorag serve --host 127.0.0.1 --port 8000Windows PowerShell:
$env:VISORAG_API_TOKEN = "change-me"
python -m visorag serve --host 127.0.0.1 --port 8000Then open http://127.0.0.1:8000/docs or check health:
python -m visorag health --url http://127.0.0.1:8000python -m visorag query \
--url http://127.0.0.1:8000 \
--token "$VISORAG_API_TOKEN" \
--file /path/to/document.pdf \
--query "What is the invoice total?" \
--query-type factual \
--top-k 5PowerShell:
python -m visorag query `
--url http://127.0.0.1:8000 `
--token $env:VISORAG_API_TOKEN `
--file C:\path\to\document.pdf `
--query "What is the invoice total?" `
--query-type factual `
--top-k 5Do not use private or customer documents in public demos, issues, logs, or screenshots.