loopable / requirements.txt
fsanyoto's picture
Deploy AIOS web (React glide grid + FastAPI slice)
3e19b1e verified
Raw History Blame Contribute Delete
4.02 kB
# AIOS web API β€” the FastAPI backend + the platform data-layer deps it reuses.
#
# β›” STREAMLIT IS GONE (EXIT-6, 2026-08-04) β€” do not add it back. The line here read
# `streamlit==1.58.0` with the comment "included only because the shared modules/core may import
# it at load; it is never served". That stopped being true when the shared layer was cleaned, and
# it stayed in THIS file β€” the one the Dockerfile actually installs β€” while `api/requirements.txt`
# had already dropped it and a gate reported the omission "verified". ~250 MB of image for a
# package nothing imported.
#
# The lesson is the file, not the package: the PINNED intent and the SHIPPED manifest are two
# different documents, and checking only the one you wrote is how the other rots.
# `api/verify_no_streamlit.py` now checks BOTH, and proves the API imports with streamlit,
# plotly, altair, openpyxl, reportlab and jinja2 all blocked at sys.meta_path.
# No altair/plotly/reportlab either β€” those were Streamlit UI/export only. openpyxl RETURNED in
# wave 21 (C5) as a LAZY dep of routes_uploads.py β€” the boot proof above still holds because the
# import lives inside the handler, and the gate now asserts this line exists here.
fastapi>=0.139
starlette==1.4.1
uvicorn[standard]>=0.30
python-dotenv>=1.2.2
pandas>=2.0
requests>=2.28
huggingface_hub>=0.20
duckdb==1.5.4
# duckdb's pandas bridge imports pytz for timezone values; pandas 3 no longer installs it.
pytz>=2024.1
pyyaml>=6.0
jsonschema==4.26.0
pillow>=10.0
beautifulsoup4>=4.12
lxml>=5.0
cryptography>=42.0
# ⭐ WAVE 20 (R1 / D-4) β€” THE POSTGRES DRIVER, AND IT IS LOAD-BEARING IN THIS FILE SPECIFICALLY.
# `core/store_pg.py` is the store backend from this wave on, and it is deliberately FAIL-CLOSED:
# `_pool()` raises rather than falling back to the HF file store, so a container that gets
# `STORE_BACKEND=pg` without this line does not degrade β€” it refuses every request that touches
# the store, which is every authenticated request.
#
# β›” AND THIS IS THE FILE THAT MATTERS: the Dockerfile does `COPY requirements.txt` from the
# Space root, i.e. THIS manifest, not `api/requirements.txt`. That header's own streamlit story
# is the same defect in the other direction β€” the pinned intent and the shipped manifest are two
# documents. psycopg is now in BOTH, and `ops/verify_portability.py` gates the pair.
psycopg[binary,pool]>=3.2
# S82-T131 (C8, R25): core/tenant_keys.py wraps tenant data keys with AWS KMS. Both manifests.
boto3>=1.34,<2
# ⭐ WAVE 21 (item 11, C5) β€” .xlsx preview for Select-from-file; lazy-imported in
# routes_uploads.py only. verify_no_streamlit asserts this line in BOTH manifests.
openpyxl>=3.1
# Core-font PDF exports import fpdf only while rendering.
fpdf2==2.8.4
# β›” AND ITS TRANSPORT, learned from a RUNTIME_ERROR on the first v6 boot: FastAPI demands
# python-multipart AT IMPORT TIME for any route declaring File(...)/Form(...). Every local gate
# was green because the dev box happens to have it for unrelated reasons β€” the container
# installs exactly this file. The environment-parity twin of the streamlit lesson above.
python-multipart>=0.0.31
# ⭐ WAVE 37 (D-346, answering `ASK E-1`) β€” THE OFFICIAL ANTHROPIC SDK. `ai_review.py` called the
# Messages API over raw `requests`, which meant re-implementing retries, streaming and error
# taxonomy by hand and drifting from them silently. E ships the SDK behind a LAZY import with the
# raw-HTTP call still there as the fallback, so the feature works with or without this line β€” what
# the line does is turn the fallback into dead weight instead of the live path.
# ⚠ BOTH MANIFESTS, NOT ONE. This file's own streamlit story at the top is exactly what pinning
# one of them looks like a year later.
# D-384: an EXACT pin, equal to `api/requirements.txt`. This is the manifest the Dockerfile
# installs, so a floor here meant the container ran whatever PyPI resolved at build time.
# `api/verify_no_streamlit.py` asserts the two pins agree.
anthropic==0.96.0