caelum0x 174222bcaa feat: Builder-Track named-user tools, bio + evidence-intelligence platform, Apache-2.0
Builds PaperTrail from the base skeleton into a full evidence-verification platform
for the "Built with Claude: Life Sciences" hackathon (Builder Track).

New named-user features (Build Beyond the Bench):
- Lab Notebook Companion — rough bench notes -> structured, searchable, grounded
  experiment records (lib/labNotebook, /console/lab-notebook, migration 0059)
- Clinical Trial Matcher — de-identified patient notes -> ranked eligible
  ClinicalTrials.gov trials with per-criterion inclusion/exclusion reasoning
  (lib/trialMatcher, /console/trial-matcher, migrations 0060)

Platform:
- Deterministic verification moat (biostats recompute, exact-span grounding)
- 11 biomedical evidence engines (FAERS, GWAS, Open Targets, ChEMBL, ClinVar,
  PharmGKB, PubTator, DDI, repurposing, biomarker, unified verifier)
- Evidence Intelligence (KG, dossier, provenance/export, RWE) + enterprise
  governance (RBAC, /api/v1 gateway, metering, audit chain, retention)
- 17 OSS projects assimilated into native TypeScript on our stack (backend/engines
  retained + credited in NOTICE)
- Multi-format upload (PDF/DOCX/XLSX/CSV/MD/TXT), logo, marketing site
- Next.js 16 upgrade, benchmark harness (honest smoke-test caveat)

Licensing: Apache-2.0 (LICENSE + NOTICE).
2026-07-10 16:23:13 +03:00

65 lines
2.7 KiB
Docker

# Stage 1: Browser and build tools installation
# Python 3.12+ required for LangChain v1
FROM python:3.12-slim-bookworm AS install-browser
# Install Chromium, Chromedriver, Firefox, Geckodriver, and build tools in one layer
RUN apt-get update \
&& apt-get install -y gnupg wget ca-certificates --no-install-recommends \
&& ARCH=$(dpkg --print-architecture) \
&& wget -qO - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& echo "deb [arch=${ARCH}] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \
&& apt-get update \
&& apt-get install -y chromium chromium-driver \
&& chromium --version && chromedriver --version \
&& apt-get install -y --no-install-recommends firefox-esr build-essential \
&& GECKO_ARCH=$(case ${ARCH} in amd64) echo "linux64" ;; arm64) echo "linux-aarch64" ;; *) echo "linux64" ;; esac) \
&& wget https://github.com/mozilla/geckodriver/releases/download/v0.36.0/geckodriver-v0.36.0-${GECKO_ARCH}.tar.gz \
&& tar -xvzf geckodriver-v0.36.0-${GECKO_ARCH}.tar.gz \
&& chmod +x geckodriver \
&& mv geckodriver /usr/local/bin/ \
&& rm geckodriver-v0.36.0-${GECKO_ARCH}.tar.gz \
&& rm -rf /var/lib/apt/lists/* # Clean up apt lists to reduce image size
# Stage 2: Python dependencies installation
FROM install-browser AS gpt-researcher-install
ENV PIP_ROOT_USER_ACTION=ignore
WORKDIR /usr/src/app
# Copy and install Python dependencies in a single layer to optimize cache usage
COPY ./requirements.txt ./requirements.txt
COPY ./multi_agents/requirements.txt ./multi_agents/requirements.txt
RUN pip install --upgrade pip && \
pip install --no-cache-dir -r requirements.txt --upgrade --prefer-binary && \
pip install --no-cache-dir -r multi_agents/requirements.txt --upgrade --prefer-binary
# Stage 3: Final stage with non-root user and app
FROM gpt-researcher-install AS gpt-researcher
# Basic server configuration
ARG HOST=0.0.0.0
ENV HOST=${HOST}
ARG PORT=8000
ENV PORT=${PORT}
EXPOSE ${PORT}
# Uvicorn parameters used in CMD
ARG WORKERS=1
ENV WORKERS=${WORKERS}
# Create a non-root user for security
# NOTE: Don't use this if you are relying on `_check_pkg` to pip install packages dynamically.
RUN useradd -ms /bin/bash gpt-researcher && \
chown -R gpt-researcher:gpt-researcher /usr/src/app && \
# Add these lines to create and set permissions for outputs directory
mkdir -p /usr/src/app/outputs && \
chown -R gpt-researcher:gpt-researcher /usr/src/app/outputs && \
chmod 777 /usr/src/app/outputs
USER gpt-researcher
WORKDIR /usr/src/app
# Copy the rest of the application files with proper ownership
COPY --chown=gpt-researcher:gpt-researcher ./ ./
CMD uvicorn main:app --host ${HOST} --port ${PORT} --workers ${WORKERS}