pyproject.toml (Python 3.12, uv), codex/ package (config, db, models), infra/ (docker-compose + schema), .env.example, .gitignore, README. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
48 lines
1.5 KiB
YAML
48 lines
1.5 KiB
YAML
# Paper knowledge base: Provenance + Citation graph + Semantic search
|
|
# A single Postgres instance (pgvector) covers all three layers.
|
|
# GROBID parses references / structure from PDFs without an arXiv source.
|
|
#
|
|
# Quick start:
|
|
# docker compose up -d
|
|
# psql "${DATABASE_URL}" # see .env.example for default value
|
|
|
|
services:
|
|
db:
|
|
image: pgvector/pgvector:pg17 # official pgvector image
|
|
container_name: papers-db
|
|
environment:
|
|
POSTGRES_DB: papers
|
|
POSTGRES_USER: researcher
|
|
POSTGRES_PASSWORD: change_me # change before production use
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
# schema.sql is executed automatically on first start:
|
|
- ./schema.sql:/docker-entrypoint-initdb.d/01-schema.sql:ro
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U researcher -d papers"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
|
|
grobid:
|
|
# CRF-only image is sufficient for reference extraction and is lighter than
|
|
# the full deeplearning variant. Check https://hub.docker.com/r/grobid/grobid
|
|
# for the latest 0.8.x tag before deploying.
|
|
image: grobid/grobid:0.8.2
|
|
container_name: papers-grobid
|
|
ports:
|
|
- "8070:8070"
|
|
restart: unless-stopped
|
|
# GROBID is RAM-hungry; uncomment to cap usage on constrained hardware
|
|
# (e.g. Nvidia Jetson):
|
|
# deploy:
|
|
# resources:
|
|
# limits:
|
|
# memory: 4g
|
|
|
|
volumes:
|
|
pgdata:
|