Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,19 @@ WORKDIR /app
COPY pyproject.toml .
COPY src ./src

RUN pip install --no-cache-dir ".[tor,instsci]"
RUN pip install --no-cache-dir ".[tor,cloakbrowser,instsci]"

FROM python:3.12-slim

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libglib2.0-0 libnss3 libnspr4 libdbus-1-3 \
libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 \
libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 \
libxrandr2 libgbm1 libpango-1.0-0 libcairo2 libasound2 \
libatspi2.0-0 libwayland-client0 tini \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /app

COPY --from=builder /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages
Expand All @@ -19,6 +28,9 @@ COPY pyproject.toml .
EXPOSE 8000

ENV SCANSCI_PDF_DATA_DIR=/data/paper-fetch
ENV CLOAKBROWSER_CACHE_DIR=/data/paper-fetch/browser-cache
ENV MCP_MODE=streamable_http
ENV MALLOC_ARENA_MAX=2

ENTRYPOINT ["tini", "--"]
CMD ["python", "-m", "scansci_pdf", "run", "--mode", "streamable_http"]
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dependencies = [
"requests>=2.31",
"requests[socks]>=2.31",
"beautifulsoup4>=4.12",
"PyMuPDF>=1.24",
"mcp[cli]>=1.12",
"typer>=0.15",
"uvicorn>=0.34",
Expand Down
Loading