Operations & Deployment

Overview

This is a local-only application with no cloud deployment. This section covers local setup, dependencies, and hardware requirements.

Prerequisites

ComponentRequirementNotes
Python3.9+Tested with 3.10/3.11/3.12
GPU (Recommended)NVIDIA CUDA or Apple MPSFor comfortable indexing speeds
RAM8GB minimum16GB+ recommended for 10k+ images
VRAM4GB+For half-precision model inference

Setup

pip install -r requirements.txt

Dependencies:

PackagePurpose
fastapi, uvicornAPI framework and ASGI server
chromadbPersistent vector database
transformers, accelerateHuggingFace model loading
torch, torchvisionDeep learning runtime
Pillow, pillow-heifImage loading and HEIF support
opencv-pythonVideo frame extraction
qwen-vl-utilsVision processing utilities
tqdmProgress bars

Running the Application

Step 1: Index the Vault

python indexer.py vault
python indexer.py vault --batch 16

Step 2: Start the API Server

python api.py
# Server starts at http://127.0.0.1:8000

Scalability

  • Vault Size: Designed to handle 10k+ images.
  • Database: ChromaDB uses HNSW indexing with cosine similarity for sub-100ms lookups.
  • Batch Processing: Adjustable via --batch parameter (default: 8). Larger batches improve throughput but require more VRAM.
  • Indexing Time: Dependent on GPU. Expect 10-30 images/sec on modern GPUs.

Maintenance

TaskCommandNotes
Re-index after vault changespython indexer.py vaultAutomatic via mtime tracking
Clear and rebuild DBDelete .db/ folderFull re-index required
Clear thumbnailsDelete .cache/thumbnails/Regenerated on next run

Monitoring

  • /health endpoint returns current device and status.
  • Console output from indexer.py shows processing throughput.

Last Updated: 2026-06-17