Skip to content

Commit 3bc992a

Browse files
authored
Merge pull request #67 from lightspeed-core/revert-65-hermetic
Revert "LCORE-791: konflux hermetic build"
2 parents 79809d2 + 8ad71f5 commit 3bc992a

16 files changed

+65
-3673
lines changed

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

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -30,42 +30,8 @@ spec:
3030
- name: build-platforms
3131
value:
3232
- linux/x86_64
33-
- linux-c6gd2xlarge/arm64
3433
- name: dockerfile
3534
value: Containerfile
36-
- name: build-source-image
37-
value: 'true'
38-
- name: prefetch-input
39-
# no source available: torch, faiss-cpu
40-
# hermeto prefetch problems: uv, pip, jiter, tiktoken,
41-
# those need cmake to build: pyarrow
42-
# those need cargo to build: jiter, tiktoken, cryptography, fastuuid, hf_xet, maturin, pydantic_core, rpds_py, safetensors, tokenizers
43-
# to accelerate build:numpy, scipy, pandas, pillow, scikit_learn
44-
value: |
45-
[
46-
{
47-
"type": "rpm",
48-
"path": "."
49-
},
50-
{
51-
"type": "pip",
52-
"path": ".",
53-
"requirements_files": [
54-
"requirements.hashes.wheel.txt",
55-
"requirements.hashes.source.txt",
56-
"requirements.hermetic.txt"
57-
],
58-
"requirements_build_files": ["requirements-build.txt"],
59-
"binary": {
60-
"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-ibm-models,einops,et-xmlfile,faiss-cpu,filetype,fire,frozenlist,googleapis-common-protos,greenlet,h11,hf-xet,httpcore,httpx,huggingface-hub,idna,jinja2,jiter,joblib,jsonlines,jsonref,jsonschema-specifications,latex2mathml,llama-stack-client,lxml,markdown-it-py,markupsafe,mdurl,mpire,mpmath,multidict,mypy-extensions,nest-asyncio,networkx,nltk,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,pyaml,pycparser,pydantic,pydantic-core,pydantic-settings,pygments,pyjwt,pylatexenc,python-dateutil,python-docx,python-dotenv,python-multipart,python-pptx,pytz,pyyaml,referencing,requests,rich,rpds-py,rtree,safetensors,scikit-learn,scipy,semchunk,sentence-transformers,shapely,shellingham,six,sniffio,sqlalchemy,starlette,sympy,tabulate,tenacity,threadpoolctl,tiktoken,tokenizers,torch,torchvision,tqdm,transformers,triton,typer,typing-extensions,typing-inspect,typing-inspection,tzdata,wcwidth,wrapt,xlsxwriter,yarl,zipp,uv-build,uv,pip,maturin,opencv-python,rapidocr,sqlite-vec",
61-
"os": "linux",
62-
"arch": "x86_64,aarch64",
63-
"py_version": "312"
64-
}
65-
}
66-
]
67-
- name: hermetic
68-
value: 'true'
6935
pipelineSpec:
7036
description: |
7137
This pipeline is ideal for building multi-arch container images from a Containerfile while maintaining trust after pipeline customization.

.tekton/rag-tool-push.yaml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -29,39 +29,6 @@ spec:
2929
- linux/x86_64
3030
- name: dockerfile
3131
value: Containerfile
32-
- name: build-source-image
33-
value: 'true'
34-
- name: prefetch-input
35-
# no source available: torch, faiss-cpu
36-
# hermeto prefetch problems: uv, pip, jiter, tiktoken,
37-
# those need cmake to build: pyarrow
38-
# those need cargo to build: jiter, tiktoken, cryptography, fastuuid, hf_xet, maturin, pydantic_core, rpds_py, safetensors, tokenizers
39-
# to accelerate build:numpy, scipy, pandas, pillow, scikit_learn
40-
value: |
41-
[
42-
{
43-
"type": "rpm",
44-
"path": "."
45-
},
46-
{
47-
"type": "pip",
48-
"path": ".",
49-
"requirements_files": [
50-
"requirements.hashes.wheel.txt",
51-
"requirements.hashes.source.txt",
52-
"requirements.hermetic.txt"
53-
],
54-
"requirements_build_files": ["requirements-build.txt"],
55-
"binary": {
56-
"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-ibm-models,einops,et-xmlfile,faiss-cpu,filetype,fire,frozenlist,googleapis-common-protos,greenlet,h11,hf-xet,httpcore,httpx,huggingface-hub,idna,jinja2,jiter,joblib,jsonlines,jsonref,jsonschema-specifications,latex2mathml,llama-stack-client,lxml,markdown-it-py,markupsafe,mdurl,mpire,mpmath,multidict,mypy-extensions,nest-asyncio,networkx,nltk,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,pyaml,pycparser,pydantic,pydantic-core,pydantic-settings,pygments,pyjwt,pylatexenc,python-dateutil,python-docx,python-dotenv,python-multipart,python-pptx,pytz,pyyaml,referencing,requests,rich,rpds-py,rtree,safetensors,scikit-learn,scipy,semchunk,sentence-transformers,shapely,shellingham,six,sniffio,sqlalchemy,starlette,sympy,tabulate,tenacity,threadpoolctl,tiktoken,tokenizers,torch,torchvision,tqdm,transformers,triton,typer,typing-extensions,typing-inspect,typing-inspection,tzdata,wcwidth,wrapt,xlsxwriter,yarl,zipp,uv-build,uv,pip,maturin,opencv-python,rapidocr,sqlite-vec",
57-
"os": "linux",
58-
"arch": "x86_64,aarch64",
59-
"py_version": "312"
60-
}
61-
}
62-
]
63-
- name: hermetic
64-
value: 'true'
6532
pipelineSpec:
6633
description: |
6734
This pipeline is ideal for building multi-arch container images from a Containerfile while maintaining trust after pipeline customization.

Containerfile

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ RUN microdnf install -y --nodocs --setopt=keepcache=0 --setopt=tsflags=nodocs \
99
RUN microdnf install -y rubygems && \
1010
microdnf clean all && \
1111
gem install asciidoctor
12-
1312
# Install uv package manager
14-
RUN pip3.12 install uv>=0.7.20
13+
RUN pip3.12 install uv==0.7.20
1514

1615
WORKDIR /rag-content
1716

@@ -22,11 +21,8 @@ COPY scripts ./scripts
2221

2322
# Configure UV environment variables for optimal performance
2423
# Pytorch backend - cpu. `uv` contains convenient way to specify the backend.
25-
# MATURIN_NO_INSTALL_RUST=1 : Disable installation of Rust dependencies by Maturin.
2624
ENV UV_COMPILE_BYTECODE=0 \
27-
UV_LINK_MODE=copy \
28-
UV_PYTHON_DOWNLOADS=0 \
29-
MATURIN_NO_INSTALL_RUST=1
25+
UV_PYTHON_DOWNLOADS=0
3026

3127
# Install Python dependencies
3228
RUN uv sync --locked --no-install-project
@@ -47,12 +43,4 @@ RUN python ./scripts/download_embeddings_model.py \
4743
# Reset the entrypoint.
4844
ENTRYPOINT []
4945

50-
LABEL vendor="Red Hat, Inc." \
51-
name="lightspeed-core/rag-tool-rhel9" \
52-
com.redhat.component="lightspeed-core/rag-tool" \
53-
cpe="cpe:/a:redhat:lightspeed_core:0.4::el9" \
54-
io.k8s.display-name="Lightspeed RAG Tool" \
55-
summary="RAG tool containing embedding model and dependencies needed to generate a vector database." \
56-
description="RAG Tool provides a shared codebase for generating vector databases. It serves as the core framework for Lightspeed-related projects (e.g., OpenShift Lightspeed, OpenStack Lightspeed, etc.) to generate their own vector databases that can be used for RAG." \
57-
io.k8s.description="RAG Tool provides a shared codebase for generating vector databases. It serves as the core framework for Lightspeed-related projects (e.g., OpenShift Lightspeed, OpenStack Lightspeed, etc.) to generate their own vector databases that can be used for RAG." \
58-
io.openshift.tags="lightspeed-core,lightspeed-rag-tool,lightspeed"
46+
LABEL description="Contains embedding model and dependencies needed to generate a vector database"

Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,6 @@ start-postgres-debug: ## Start postgresql from the pgvector container image with
101101
-v ./postgresql/data:/var/lib/postgresql/data:Z pgvector/pgvector:pg16 \
102102
postgres -c log_statement=all -c log_destination=stderr
103103

104-
konflux-requirements: ## generate hermetic requirements.*.txt file for konflux build
105-
./scripts/konflux_requirements.sh
106-
107104
.PHONY: help
108105
help: ## Show this help screen
109106
@echo 'Usage: make <OPTIONS> ... <TARGETS>'

pyproject.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ dependencies = [
4747
"llama-index-vector-stores-postgres>=0.5.4",
4848
# Pin torch/torchvision to versions available as CPU wheels
4949
# torch 2.5.x pairs with torchvision 0.20.x
50-
"torch>=2.8.0,<2.9.0",
51-
"torchvision>=0.23.0,<0.24.0",
50+
"torch>=2.5.0,<2.6.0",
51+
"torchvision>=0.20.0,<0.21.0",
5252
"llama-stack==0.3.5",
5353
"llama-stack-client==0.3.5",
5454
"aiosqlite>=0.21.0",
@@ -87,8 +87,6 @@ dev = [
8787
"pytest>=8.3.4",
8888
"pytest-cov>=6.0.0",
8989
"pytest-mock>=3.15.1",
90-
"pybuild-deps>=0.5.0",
91-
"pip==24.3.1",
9290
]
9391

9492
[tool.pylint."MESSAGES CONTROL"]

requirements-build.txt

Lines changed: 0 additions & 214 deletions
This file was deleted.

0 commit comments

Comments
 (0)