This change enables shipping Docker images with pre-indexed knowledge graphs, eliminating the need to re-index documents in production deployments. Benefits: - Reduces embedding API costs (no re-indexing in production) - Enables instant query capability (zero startup delay) - Ensures consistent embeddings across deployments - Simplifies multi-region and offline deployments Changes: - Modified Dockerfile to optionally copy pre-built graph file - Updated .dockerignore to allow specific graph files through - Added comprehensive rag_storage/README.md documentation Implementation Details: - Graph file: graph_chunk_entity_relation.graphml - Copy is optional: builds succeed with or without the file - .dockerignore pattern allows graph while excluding other storage - Documentation covers use cases, best practices, and troubleshooting Usage: 1. Build knowledge graph locally 2. Docker build automatically includes it if present 3. Deploy container with instant query capability The feature is backward compatible - existing builds work unchanged.
74 lines
887 B
Text
74 lines
887 B
Text
# Python-related files and directories
|
|
__pycache__
|
|
.cache
|
|
|
|
# Virtual environment directories
|
|
*.venv
|
|
|
|
# Env
|
|
env/
|
|
*.env*
|
|
.env_example
|
|
|
|
# Distribution / build files
|
|
site
|
|
dist/
|
|
build/
|
|
.eggs/
|
|
*.egg-info/
|
|
*.tgz
|
|
*.tar.gz
|
|
|
|
# Exclude siles and folders
|
|
*.yml
|
|
.dockerignore
|
|
Dockerfile
|
|
Makefile
|
|
|
|
# Exclude other projects
|
|
/tests
|
|
/scripts
|
|
/data
|
|
/dickens
|
|
/reproduce
|
|
/output_complete
|
|
|
|
# Exclude rag_storage but allow pre-built knowledge graph (optional)
|
|
/rag_storage/*
|
|
!/rag_storage/graph_chunk_entity_relation.graphml
|
|
!/rag_storage/README.md
|
|
|
|
/inputs
|
|
|
|
# Python version manager file
|
|
.python-version
|
|
|
|
# Reports
|
|
*.coverage/
|
|
*.log
|
|
log/
|
|
*.logfire
|
|
|
|
# Cache
|
|
.cache/
|
|
.mypy_cache
|
|
.pytest_cache
|
|
.ruff_cache
|
|
.gradio
|
|
.logfire
|
|
temp/
|
|
|
|
# MacOS-related files
|
|
.DS_Store
|
|
|
|
# VS Code settings (local configuration files)
|
|
.vscode
|
|
|
|
# file
|
|
TODO.md
|
|
|
|
# Exclude Git-related files
|
|
.git
|
|
.github
|
|
.gitignore
|
|
.pre-commit-config.yaml
|