Skip to content

Commit cde758a

Browse files
committed
konflux: do not fetch binary python wheels
Signed-off-by: Haoyu Sun <hasun@redhat.com>
1 parent 668d09c commit cde758a

12 files changed

+644
-245
lines changed

.tekton/lightspeed-stack-pull-request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ spec:
3434
- name: build-source-image
3535
value: 'true'
3636
- name: prefetch-input
37-
value: '[{"type": "rpm", "path": "."}, {"type": "pip", "path": ".", "allow_binary": "true", "requirements_files": ["requirements.x86_64.txt", "requirements.aarch64.txt", "requirements.hermetic.txt", "requirements.torch.txt"]}]'
37+
value: '[{"type": "rpm", "path": "."}, {"type": "pip", "path": ".", "requirements_files": ["requirements.x86_64.txt", "requirements.aarch64.txt", "requirements.hermetic.txt", "requirements.torch.txt", "requirements.binary.txt"], "requirements_build_files": ["requirements-build.txt"], "binary": {"os": "linux", "arch": "x86_64,aarch64", "py_version": "312", "packages": "torch,faiss-cpu" } }]'
3838
- name: hermetic
3939
value: 'true'
4040
- name: dockerfile

.tekton/lightspeed-stack-push.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ spec:
3131
- name: build-source-image
3232
value: 'true'
3333
- name: prefetch-input
34-
value: '[{"type": "rpm", "path": "."}, {"type": "pip", "path": ".", "allow_binary": "true", "requirements_files": ["requirements.x86_64.txt", "requirements.aarch64.txt", "requirements.hermetic.txt", "requirements.torch.txt"]}]'
34+
value: '[{"type": "rpm", "path": "."}, {"type": "pip", "path": ".", "requirements_files": ["requirements.x86_64.txt", "requirements.aarch64.txt", "requirements.hermetic.txt", "requirements.torch.txt", "requirements.binary.txt"], "requirements_build_files": ["requirements-build.txt"], "binary": {"os": "linux", "arch": "x86_64,aarch64", "py_version": "312", "packages": "torch,faiss-cpu" }}]'
3535
- name: hermetic
3636
value: 'true'
3737
- name: dockerfile

Containerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ COPY ${LSC_SOURCE_DIR}/pyproject.toml ${LSC_SOURCE_DIR}/LICENSE ${LSC_SOURCE_DIR
3131
# PIP_FIND_LINKS=/cachi2/output/deps/pip
3232
# PIP_NO_INDEX=true
3333
RUN if [ -f /cachi2/cachi2.env ]; then \
34-
. /cachi2/cachi2.env && uv venv --seed --no-index --find-links ${PIP_FIND_LINKS} && . .venv/bin/activate && pip install --no-index --find-links ${PIP_FIND_LINKS} -r requirements.$(uname -m).txt -r requirements.torch.txt; \
34+
. /cachi2/cachi2.env && uv venv --seed --no-index --find-links ${PIP_FIND_LINKS} && . .venv/bin/activate && pip install --no-index --find-links ${PIP_FIND_LINKS} --no-binary :all: -r requirements.$(uname -m).txt && pip install --no-index --find-links ${PIP_FIND_LINKS} -r requirements-binary.txt -r requirements.torch.txt; \
3535
else \
3636
uv sync --locked --no-dev --group llslibdev; \
3737
fi

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ PYTHON_REGISTRY = pypi
66

77
# PyTorch version
88
TORCH_VERSION := 2.7.1
9-
9+
# Faiss version
10+
FAISS_VERSION := 1.13.0
1011

1112
run: ## Run the service locally
1213
uv run src/lightspeed_stack.py
@@ -114,6 +115,8 @@ konflux-requirements: ## generate hermetic requirements.*.txt file for konflux b
114115
./scripts/remove_torch_deps.sh requirements.x86_64.txt
115116
./scripts/remove_torch_deps.sh requirements.aarch64.txt
116117
echo "torch==${TORCH_VERSION}" | uv pip compile - -o requirements.torch.txt --generate-hashes --python-version 3.12 --torch-backend cpu --emit-index-url --no-deps --index-url https://download.pytorch.org/whl/cpu
118+
echo "faiss-cpu==${FAISS_VERSION}" | uv pip compile - -o requirements.binary.txt --generate-hashes --python-version 3.12 --no-deps --universal
119+
uv run pybuild-deps compile --output-file=requirements-build.txt requirements.aarch64.txt requirements.x86_64.txt
117120

118121
help: ## Show this help screen
119122
@echo 'Usage: make <OPTIONS> ... <TARGETS>'

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ dev = [
122122
"openapi-to-md>=0.1.0b2",
123123
"pytest-subtests>=0.14.2",
124124
"bandit>=1.8.6",
125+
"pybuild-deps==0.5.0",
126+
"pip==24.3.1",
125127
]
126128
llslibdev = [
127129
# To check llama-stack API provider dependecies:

requirements-build.txt

Lines changed: 318 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,318 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.12
3+
# by the following command:
4+
#
5+
# pybuild-deps compile --output-file=requirements-build.txt requirements.aarch64.txt requirements.x86_64.txt
6+
#
7+
beniget==0.4.2.post1
8+
# via pythran
9+
calver==2025.10.20
10+
# via trove-classifiers
11+
cffi==2.0.0
12+
# via cryptography
13+
coherent-licensed==0.5.2
14+
# via zipp
15+
cppy==1.3.1
16+
# via kiwisolver
17+
cython==3.1.7
18+
# via scipy
19+
cython==3.2.2
20+
# via
21+
# asyncpg
22+
# lxml
23+
# numpy
24+
# pandas
25+
# pyarrow
26+
# pyyaml
27+
# scikit-learn
28+
# sqlalchemy
29+
dunamai==1.25.0
30+
# via uv-dynamic-versioning
31+
expandvars==1.1.2
32+
# via
33+
# frozenlist
34+
# propcache
35+
# yarl
36+
flit-core==3.12.0
37+
# via
38+
# aiosqlite
39+
# click
40+
# coherent-licensed
41+
# idna
42+
# jinja2
43+
# markdown-it-py
44+
# mdurl
45+
# packaging
46+
# pathspec
47+
# pyparsing
48+
# pyproject-metadata
49+
# threadpoolctl
50+
# typing-extensions
51+
# wheel
52+
gast==0.6.0
53+
# via
54+
# beniget
55+
# pythran
56+
hatch-fancy-pypi-readme==25.1.0
57+
# via
58+
# attrs
59+
# httpcore
60+
# httpx
61+
# jsonschema
62+
# llama-stack-client
63+
# openai
64+
# pydantic
65+
hatch-vcs==0.5.0
66+
# via
67+
# attrs
68+
# filelock
69+
# fsspec
70+
# jsonschema
71+
# jsonschema-specifications
72+
# referencing
73+
# scikit-build-core
74+
# termcolor
75+
# urllib3
76+
hatchling==1.26.3
77+
# via
78+
# hatch-fancy-pypi-readme
79+
# llama-stack-client
80+
# openai
81+
hatchling==1.28.0
82+
# via
83+
# annotated-types
84+
# attrs
85+
# dnspython
86+
# expandvars
87+
# filelock
88+
# fsspec
89+
# hatch-fancy-pypi-readme
90+
# hatch-vcs
91+
# httpcore
92+
# httpx
93+
# jsonschema
94+
# jsonschema-specifications
95+
# mcp
96+
# opentelemetry-api
97+
# opentelemetry-exporter-otlp
98+
# opentelemetry-exporter-otlp-proto-common
99+
# opentelemetry-exporter-otlp-proto-grpc
100+
# opentelemetry-exporter-otlp-proto-http
101+
# opentelemetry-instrumentation
102+
# opentelemetry-proto
103+
# opentelemetry-sdk
104+
# opentelemetry-semantic-conventions
105+
# pydantic
106+
# pydantic-settings
107+
# pygments
108+
# python-multipart
109+
# referencing
110+
# scikit-build-core
111+
# starlette
112+
# termcolor
113+
# typing-inspection
114+
# urllib3
115+
# uv-dynamic-versioning
116+
# uvicorn
117+
jinja2==3.1.6
118+
# via uv-dynamic-versioning
119+
markupsafe==3.0.3
120+
# via jinja2
121+
maturin==1.10.2
122+
# via
123+
# cryptography
124+
# fastuuid
125+
# hf-xet
126+
# jiter
127+
# pydantic-core
128+
# rpds-py
129+
# safetensors
130+
# tokenizers
131+
meson-python==0.16.0
132+
# via matplotlib
133+
meson-python==0.18.0
134+
# via
135+
# contourpy
136+
# numpy
137+
# pandas
138+
# scikit-learn
139+
# scipy
140+
meson==1.10.0
141+
# via
142+
# contourpy
143+
# meson-python
144+
# pandas
145+
numpy==2.2.6
146+
# via
147+
# pandas
148+
# pyarrow
149+
# scikit-learn
150+
# scipy
151+
packaging==25.0
152+
# via
153+
# hatchling
154+
# meson-python
155+
# scikit-build-core
156+
# setuptools-scm
157+
pathspec==0.12.1
158+
# via
159+
# hatchling
160+
# scikit-build-core
161+
pdm-backend==2.4.6
162+
# via
163+
# annotated-doc
164+
# fastapi
165+
pkgconfig==1.5.5
166+
# via aiohttp
167+
pluggy==1.6.0
168+
# via hatchling
169+
ply==3.11
170+
# via pythran
171+
poetry-core==2.2.1
172+
# via
173+
# aiohappyeyeballs
174+
# dunamai
175+
# litellm
176+
# pkgconfig
177+
# rich
178+
# rsa
179+
# tomlkit
180+
pybind11==3.0.1
181+
# via
182+
# contourpy
183+
# matplotlib
184+
# pillow
185+
# scipy
186+
pycparser==2.23
187+
# via cffi
188+
pyproject-metadata==0.10.0
189+
# via meson-python
190+
pythran==0.18.1
191+
# via scipy
192+
scikit-build-core==0.11.6
193+
# via pybind11
194+
scipy==1.16.3
195+
# via scikit-learn
196+
semantic-version==2.10.0
197+
# via setuptools-rust
198+
setuptools-rust==1.12.0
199+
# via
200+
# maturin
201+
# tiktoken
202+
setuptools-scm==7.1.0
203+
# via python-dateutil
204+
setuptools-scm==9.2.2
205+
# via
206+
# anyio
207+
# cppy
208+
# hatch-vcs
209+
# httpx-sse
210+
# importlib-metadata
211+
# kiwisolver
212+
# matplotlib
213+
# pluggy
214+
# pyarrow
215+
# setuptools-rust
216+
# sniffio
217+
# tqdm
218+
# urllib3
219+
# zipp
220+
tomlkit==0.13.3
221+
# via uv-dynamic-versioning
222+
trove-classifiers==2025.12.1.14
223+
# via hatchling
224+
typing-extensions==4.15.0
225+
# via setuptools-scm
226+
uv-dynamic-versioning==0.11.2
227+
# via mcp
228+
versioneer==0.29
229+
# via pandas
230+
wheel==0.45.1
231+
# via
232+
# authlib
233+
# cachetools
234+
# cppy
235+
# fire
236+
# httpx-sse
237+
# litellm
238+
# meson
239+
# pandas
240+
# python-dateutil
241+
# sentence-transformers
242+
# tiktoken
243+
# tqdm
244+
# tzdata
245+
246+
# The following packages are considered to be unsafe in a requirements file:
247+
setuptools==80.9.0
248+
# via
249+
# aiohttp
250+
# aiosignal
251+
# anyio
252+
# asyncpg
253+
# authlib
254+
# blobfile
255+
# cachetools
256+
# calver
257+
# certifi
258+
# cffi
259+
# charset-normalizer
260+
# cppy
261+
# cryptography
262+
# cycler
263+
# dill
264+
# distro
265+
# emoji
266+
# fire
267+
# frozenlist
268+
# googleapis-common-protos
269+
# greenlet
270+
# httpx-sse
271+
# importlib-metadata
272+
# joblib
273+
# kiwisolver
274+
# llama-stack
275+
# lxml
276+
# markupsafe
277+
# maturin
278+
# meson
279+
# mpmath
280+
# multidict
281+
# multiprocess
282+
# networkx
283+
# pathspec
284+
# pillow
285+
# pluggy
286+
# polyleven
287+
# prometheus-client
288+
# prompt-toolkit
289+
# propcache
290+
# psutil
291+
# pyarrow
292+
# pyasn1
293+
# pyasn1-modules
294+
# pycryptodomex
295+
# pyjwt
296+
# python-dateutil
297+
# python-dotenv
298+
# pythran
299+
# pyyaml
300+
# regex
301+
# semver
302+
# sentence-transformers
303+
# setuptools-rust
304+
# setuptools-scm
305+
# sniffio
306+
# sqlalchemy
307+
# sse-starlette
308+
# tiktoken
309+
# tqdm
310+
# tree-sitter
311+
# trl
312+
# trove-classifiers
313+
# tzdata
314+
# versioneer
315+
# wrapt
316+
# xxhash
317+
# yarl
318+
# zipp

0 commit comments

Comments
 (0)