-
Notifications
You must be signed in to change notification settings - Fork 60
[WIP] hermetic build: Non binary #858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,8 @@ PYTHON_REGISTRY = pypi | |
|
|
||
| # PyTorch version | ||
| TORCH_VERSION := 2.7.1 | ||
|
|
||
| # Faiss version | ||
| FAISS_VERSION := 1.13.0 | ||
|
|
||
| run: ## Run the service locally | ||
| uv run src/lightspeed_stack.py | ||
|
|
@@ -113,7 +114,9 @@ konflux-requirements: ## generate hermetic requirements.*.txt file for konflux b | |
| uv pip compile pyproject.toml -o requirements.aarch64.txt --generate-hashes --group llslibdev --python-platform aarch64-unknown-linux-gnu --torch-backend cpu --python-version 3.12 --refresh | ||
| ./scripts/remove_torch_deps.sh requirements.x86_64.txt | ||
| ./scripts/remove_torch_deps.sh requirements.aarch64.txt | ||
| 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 --refresh | ||
| 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 --refresh | ||
| echo "faiss-cpu==${FAISS_VERSION}" | uv pip compile - -o requirements.binary.txt --generate-hashes --python-version 3.12 --no-deps --universal | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: Short answer — uv pip compile --universal tells uv to perform a universal (platform‑independent) resolution and emit a requirements-style output with environment markers (and possibly multiple entries per package for different platforms). Universal resolution is more constrained than platform-specific resolution, may include markers on lines, and can produce multiple versions/URLs for the same project to cover different platforms. Known caveats: it can be stricter (fail when a package’s python-requires is incompatible across targets) and there are open/closed issues about marker handling and python-version interactions. (glama.ai) If you want docs/links to read: uv universal resolution docs and related GitHub issues above. (glama.ai) Citations:
🌐 Web query:
💡 Result: Short answer: faiss-cpu does NOT provide "universal" (pure‑Python none‑any / py2.py3) wheels. The project publishes platform‑specific binary wheels (manylinux/musllinux macOS Windows; CPython ABI tags or abi3 where applicable) built with cibuildwheel, so you must install the wheel that matches your Python version and platform (or build from source). (pypi.org) Citations: 🌐 Web query:
💡 Result: Short answer Why the conflict happens (concise)
What to do
Sources
Remove The 🤖 Prompt for AI Agents |
||
| uv run pybuild-deps compile --output-file=requirements-build.txt requirements.aarch64.txt requirements.x86_64.txt requirements.hermetic.txt | ||
|
|
||
| help: ## Show this help screen | ||
| @echo 'Usage: make <OPTIONS> ... <TARGETS>' | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| metadata: | ||
| version: "1.0" | ||
| artifacts: | ||
| - download_url: "https://github.com/google/googletest/archive/refs/tags/release-1.12.1.tar.gz" | ||
| checksum: "sha256:81964fe578e9bd7c94dfdb09c8e4d6e6759e19967e397dbea48d1c10e45d0df2" | ||
| filename: "googletest-release-1.12.1.tar.gz" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: lightspeed-core/lightspeed-stack
Length of output: 2899
Critical: Filename mismatch will cause build failure.
Line 46 references
requirements-binary.txt(with hyphen), but the actual file in the repository isrequirements.binary.txt(with dot). Thepip installcommand will fail because the file won't be found.The COPY directive on line 26 correctly uses the
requirements.*.txtglob pattern, which matchesrequirements.binary.txt, but the subsequentpip installcommand references the non-existentrequirements-binary.txt.Fix by changing line 46:
🤖 Prompt for AI Agents