Skip to content

Commit 40ccb00

Browse files
authored
Merge pull request #85 from raptorsun/hermetic-fix
fix: install lightspeed_rag_content module itself in hermetic built image
2 parents 9c41050 + 13d2d5c commit 40ccb00

11 files changed

+311
-97
lines changed

.tekton/rag-tool-pull-request.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,13 @@ spec:
5858
"path": ".",
5959
"requirements_files": [
6060
"requirements.hashes.wheel.txt",
61+
"requirements.hashes.wheel.pypi.txt",
6162
"requirements.hashes.source.txt",
6263
"requirements.hermetic.txt"
6364
],
6465
"requirements_build_files": ["requirements-build.txt"],
6566
"binary": {
66-
"packages": "accelerate,aiohappyeyeballs,aiohttp,aiosignal,aiosqlite,annotated-doc,annotated-types,anyio,asyncpg,attrs,beautifulsoup4,cffi,chardet,charset-normalizer,click,colorama,cryptography,dataclasses-json,defusedxml,distro,docling,docling-core,docling-parse,et-xmlfile,faiss-cpu,filetype,fire,frozenlist,googleapis-common-protos,greenlet,h11,hf-xet,httpcore,httpx,idna,jinja2,jiter,joblib,jsonlines,jsonref,jsonschema-specifications,latex2mathml,lxml,markdown-it-py,markupsafe,mdurl,mpmath,mypy-extensions,nest-asyncio,networkx,nltk,numpy,openpyxl,opentelemetry-api,opentelemetry-exporter-otlp-proto-common,opentelemetry-exporter-otlp-proto-http,opentelemetry-proto,opentelemetry-sdk,opentelemetry-semantic-conventions,packaging,pandas,pillow,platformdirs,pluggy,prompt-toolkit,propcache,psycopg2-binary,pydantic,pydantic-core,pydantic-settings,pygments,pylatexenc,pypdfium2,python-dateutil,python-docx,python-dotenv,python-pptx,pytz,pyyaml,referencing,requests,rpds-py,rtree,safetensors,scikit-learn,scipy,setuptools,shellingham,six,sniffio,starlette,sympy,tabulate,threadpoolctl,tiktoken,tokenizers,torch,torchvision,tornado,transformers,triton,typer,typing-extensions,typing-inspect,typing-inspection,tzdata,wrapt,xlsxwriter,yarl,zipp,uv-build,uv,pip,maturin,opencv-python,rapidocr,sqlite-vec",
67+
"packages": "accelerate,aiohappyeyeballs,aiohttp,aiosignal,aiosqlite,annotated-doc,annotated-types,anyio,asyncpg,attrs,beautifulsoup4,cffi,chardet,charset-normalizer,click,colorama,cryptography,dataclasses-json,defusedxml,distro,docling-parse,et-xmlfile,faiss-cpu,filetype,fire,frozenlist,googleapis-common-protos,greenlet,h11,hf-xet,httpcore,httpx,idna,jinja2,jiter,joblib,jsonlines,jsonref,jsonschema-specifications,latex2mathml,lxml,markdown-it-py,markupsafe,mdurl,mpire,mpmath,mypy-extensions,nest-asyncio,networkx,nltk,numpy,openpyxl,opentelemetry-api,opentelemetry-exporter-otlp-proto-common,opentelemetry-exporter-otlp-proto-http,opentelemetry-proto,opentelemetry-sdk,opentelemetry-semantic-conventions,packaging,pandas,pillow,platformdirs,pluggy,prompt-toolkit,propcache,psycopg2-binary,pydantic,pydantic-core,pydantic-settings,pygments,pylatexenc,pypdfium2,python-dateutil,python-docx,python-dotenv,python-pptx,pytz,pyyaml,referencing,requests,rpds-py,rtree,safetensors,scikit-learn,scipy,semchunk,setuptools,shapely,shellingham,six,sniffio,sympy,tabulate,threadpoolctl,tiktoken,tokenizers,torch,torchvision,tornado,transformers,triton,typing-extensions,typing-inspect,typing-inspection,tzdata,wrapt,xlsxwriter,yarl,zipp,uv-build,uv,pip,maturin,opencv-python,omegaconf,rapidocr,sqlite-vec,griffe,griffecli,griffelib,pyclipper,tree-sitter-typescript",
6768
"os": "linux",
6869
"arch": "x86_64,aarch64",
6970
"py_version": 312

.tekton/rag-tool-push.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,13 @@ spec:
5353
"path": ".",
5454
"requirements_files": [
5555
"requirements.hashes.wheel.txt",
56+
"requirements.hashes.wheel.pypi.txt",
5657
"requirements.hashes.source.txt",
5758
"requirements.hermetic.txt"
5859
],
5960
"requirements_build_files": ["requirements-build.txt"],
6061
"binary": {
61-
"packages": "accelerate,aiohappyeyeballs,aiohttp,aiosignal,aiosqlite,annotated-doc,annotated-types,anyio,asyncpg,attrs,beautifulsoup4,cffi,chardet,charset-normalizer,click,colorama,cryptography,dataclasses-json,defusedxml,distro,docling,docling-core,docling-parse,et-xmlfile,faiss-cpu,filetype,fire,frozenlist,googleapis-common-protos,greenlet,h11,hf-xet,httpcore,httpx,idna,jinja2,jiter,joblib,jsonlines,jsonref,jsonschema-specifications,latex2mathml,lxml,markdown-it-py,markupsafe,mdurl,mpmath,mypy-extensions,nest-asyncio,networkx,nltk,numpy,openpyxl,opentelemetry-api,opentelemetry-exporter-otlp-proto-common,opentelemetry-exporter-otlp-proto-http,opentelemetry-proto,opentelemetry-sdk,opentelemetry-semantic-conventions,packaging,pandas,pillow,platformdirs,pluggy,prompt-toolkit,propcache,psycopg2-binary,pydantic,pydantic-core,pydantic-settings,pygments,pylatexenc,pypdfium2,python-dateutil,python-docx,python-dotenv,python-pptx,pytz,pyyaml,referencing,requests,rpds-py,rtree,safetensors,scikit-learn,scipy,setuptools,shellingham,six,sniffio,starlette,sympy,tabulate,threadpoolctl,tiktoken,tokenizers,torch,torchvision,tornado,transformers,triton,typer,typing-extensions,typing-inspect,typing-inspection,tzdata,wrapt,xlsxwriter,yarl,zipp,uv-build,uv,pip,maturin,opencv-python,rapidocr,sqlite-vec",
62+
"packages": "accelerate,aiohappyeyeballs,aiohttp,aiosignal,aiosqlite,annotated-doc,annotated-types,anyio,asyncpg,attrs,beautifulsoup4,cffi,chardet,charset-normalizer,click,colorama,cryptography,dataclasses-json,defusedxml,distro,docling-parse,et-xmlfile,faiss-cpu,filetype,fire,frozenlist,googleapis-common-protos,greenlet,h11,hf-xet,httpcore,httpx,idna,jinja2,jiter,joblib,jsonlines,jsonref,jsonschema-specifications,latex2mathml,lxml,markdown-it-py,markupsafe,mdurl,mpire,mpmath,mypy-extensions,nest-asyncio,networkx,nltk,numpy,openpyxl,opentelemetry-api,opentelemetry-exporter-otlp-proto-common,opentelemetry-exporter-otlp-proto-http,opentelemetry-proto,opentelemetry-sdk,opentelemetry-semantic-conventions,packaging,pandas,pillow,platformdirs,pluggy,prompt-toolkit,propcache,psycopg2-binary,pydantic,pydantic-core,pydantic-settings,pygments,pylatexenc,pypdfium2,python-dateutil,python-docx,python-dotenv,python-pptx,pytz,pyyaml,referencing,requests,rpds-py,rtree,safetensors,scikit-learn,scipy,semchunk,setuptools,shapely,shellingham,six,sniffio,sympy,tabulate,threadpoolctl,tiktoken,tokenizers,torch,torchvision,tornado,transformers,triton,typing-extensions,typing-inspect,typing-inspection,tzdata,wrapt,xlsxwriter,yarl,zipp,uv-build,uv,pip,maturin,opencv-python,omegaconf,rapidocr,sqlite-vec,griffe,griffecli,griffelib,pyclipper,tree-sitter-typescript",
6263
"os": "linux",
6364
"arch": "x86_64,aarch64",
6465
"py_version": 312

Containerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ RUN pip3.12 install uv>=0.7.20
1616

1717
WORKDIR /rag-content
1818

19-
COPY Makefile pyproject.toml uv.lock README.md Gemfile Gemfile.lock requirements.hashes.wheel.txt requirements.hashes.source.txt requirements-build.txt ./
19+
COPY Makefile pyproject.toml uv.lock README.md Gemfile Gemfile.lock requirements.hashes.wheel.txt requirements.hashes.wheel.pypi.txt requirements.hashes.source.txt requirements-build.txt ./
2020
COPY src ./src
2121
COPY tests ./tests
2222
COPY scripts ./scripts
@@ -38,7 +38,8 @@ RUN if [ -f /cachi2/cachi2.env ]; then \
3838
. /cachi2/cachi2.env && \
3939
uv venv --seed --no-index --find-links ${PIP_FIND_LINKS} && \
4040
. .venv/bin/activate && \
41-
pip install --no-cache-dir --ignore-installed --no-index --find-links ${PIP_FIND_LINKS} --no-deps -r requirements.hashes.wheel.txt -r requirements.hashes.source.txt && \
41+
pip install --no-cache-dir --ignore-installed --no-index --find-links ${PIP_FIND_LINKS} --no-deps -r requirements.hashes.wheel.txt -r requirements.hashes.wheel.pypi.txt -r requirements.hashes.source.txt && \
42+
pip install --no-cache-dir --no-deps . && \
4243
pip check; \
4344
else \
4445
uv sync --locked --no-dev; \

pyproject.toml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ dependencies = [
4646
"faiss-cpu>=1.11.0.post1",
4747
"llama-index-vector-stores-postgres>=0.5.4",
4848
# Pin torch/torchvision to versions available as CPU wheels
49-
# torch 2.8.x pairs with torchvision 0.23.x
49+
# torch 2.9.x pairs with torchvision 0.24.x
5050
"llama-stack==0.4.3",
5151
"llama-stack-client==0.4.3",
52-
"torch>=2.8.0,<2.9.0",
53-
"torchvision>=0.23.0,<0.24.0",
52+
"torch>=2.9.0,<2.10.0",
53+
"torchvision>=0.24.0,<0.25.0",
5454
"aiosqlite>=0.21.0",
5555
"sqlite-vec>=0.1.6",
5656
"tomlkit",
@@ -69,6 +69,15 @@ dynamic = ["license", "readme"]
6969
name = "pytorch-cpu"
7070
url = "https://download.pytorch.org/whl/cpu"
7171
explicit = true
72+
# Require wheels for Linux x86_64 so torchvision resolves to a build that has
73+
# manylinux wheels (the PyTorch CPU index has multiple builds; without this,
74+
# uv can pick a build that only has win_arm64 and then sync fails on Linux).
75+
[tool.uv]
76+
required-environments = [
77+
"sys_platform == 'linux' and platform_machine == 'x86_64'",
78+
"sys_platform == 'linux' and platform_machine == 'aarch64'",
79+
]
80+
7281
[tool.uv.sources]
7382
torch = [{ index = "pytorch-cpu" }]
7483
torchvision = [{ index = "pytorch-cpu" }]

requirements-build.txt

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ hatchling==1.28.0
6161
# polyfactory
6262
# python-multipart
6363
# soupsieve
64+
# starlette
6465
# termcolor
6566
# urllib3
6667
# uvicorn
@@ -77,8 +78,8 @@ pathspec==1.0.4
7778
pdm-backend==2.4.7
7879
# via
7980
# fastapi
80-
# griffe
8181
# marko
82+
# typer
8283
pluggy==1.6.0
8384
# via hatchling
8485
poetry-core==2.3.1
@@ -108,17 +109,23 @@ wheel==0.46.3
108109
# via
109110
# pycparser
110111
# sentence-transformers
112+
# tree-sitter-c
113+
# tree-sitter-javascript
114+
# tree-sitter-python
111115

112116
# The following packages are considered to be unsafe in a requirements file:
113-
setuptools==80.10.2
117+
setuptools==82.0.0
114118
# via
115119
# calver
116120
# certifi
121+
# colorlog
122+
# dill
117123
# importlib-metadata
118124
# llama-stack
119125
# llama-stack-api
120126
# maturin
121127
# multidict
128+
# multiprocess
122129
# pathspec
123130
# pgvector
124131
# pluggy
@@ -132,4 +139,8 @@ setuptools==80.10.2
132139
# sqlalchemy
133140
# tenacity
134141
# tqdm
142+
# tree-sitter
143+
# tree-sitter-c
144+
# tree-sitter-javascript
145+
# tree-sitter-python
135146
# trove-classifiers

0 commit comments

Comments
 (0)