forked from kserve/modelmesh-runtime-adapter
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RHOAIENG-11349] - Missing requirements.txt for modelmesh-runtime-ada…
…pter component chore: Add the requirements.txt file and steps to generate it and correctly configure the Konflux build. Plus, adapt the Dockerfile to work properly witn Konflux. Signed-off-by: Spolti <[email protected]>
- Loading branch information
Showing
5 changed files
with
145 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Konflux build system Files | ||
|
||
This directory holds the requirements.txt file use in the Konflux builds to pre-fetch the required packages. | ||
|
||
Here are two files that we need to keep: | ||
|
||
- **requirements.txt**: is the result of the `pip export` command (see example below). | ||
- **requirements-build.txt**: secondary list of dependencies needed by the build stage. | ||
|
||
## How to update the requirements.txt file | ||
|
||
Once the final container is built, you can access it: | ||
|
||
```bash | ||
podman run <modelmesh-runtime-adapter-container-name> sh -c 'pip freeze' | ||
absl-py==2.1.0 ─╯ | ||
astunparse==1.6.3 | ||
cachetools==5.5.0 | ||
certifi==2024.8.30 | ||
charset-normalizer==3.3.2 | ||
flatbuffers==24.3.25 | ||
gast==0.4.0 | ||
google-auth==2.34.0 | ||
google-auth-oauthlib==1.0.0 | ||
google-pasta==0.2.0 | ||
grpcio==1.66.1 | ||
h5py==3.10.0 | ||
idna==3.8 | ||
importlib-metadata==8.4.0 | ||
keras==2.13.1 | ||
libclang==18.1.1 | ||
Markdown==3.7 | ||
MarkupSafe==2.1.5 | ||
numpy==1.24.3 | ||
oauthlib==3.2.2 | ||
opt-einsum==3.3.0 | ||
packaging==24.1 | ||
protobuf==4.25.4 | ||
pyasn1==0.6.0 | ||
pyasn1-modules==0.4.0 | ||
requests==2.32.3 | ||
requests-oauthlib==2.0.0 | ||
rsa==4.9 | ||
six==1.16.0 | ||
tensorboard==2.13.0 | ||
tensorboard-data-server==0.7.2 | ||
tensorflow==2.13.1 | ||
tensorflow-cpu-aws==2.13.1 | ||
tensorflow-estimator==2.13.0 | ||
tensorflow-io-gcs-filesystem==0.35.0 | ||
termcolor==2.4.0 | ||
typing-extensions==4.5.0 | ||
urllib3==2.2.2 | ||
werkzeug==3.0.4 | ||
wrapt==1.16.0 | ||
zipp==3.20.1 | ||
``` | ||
|
||
Note, for `tensorflow-io-gcs-filesystem` it must be pinned to **0.34.0** manually after generating the `requirements.txt` file. | ||
|
||
Then commit the changes and push. | ||
|
||
# Konflux configuration | ||
|
||
Build configuration, it requires the build be configured as follows: | ||
|
||
```yaml | ||
- name: prefetch-input | ||
value: | | ||
[{"type": "gomod"}, {"type": "rpm"}, {"type": "pip", "path": "konflux-files", "requirements_files": ["requirements.txt", "requirements-build.txt"], "allow_binary": "true"}] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[tool.poetry] | ||
name = "test" | ||
version = "0.1.0" | ||
description = "" | ||
authors = ["Spolti <[email protected]>"] | ||
readme = "README.md" | ||
|
||
[tool.poetry.dependencies] | ||
python = ">=3.8,<3.12" | ||
grpcio = "1.65.5" | ||
h5py = "3.10.0" | ||
tensorflow = "2.13.1" | ||
docutils = "0.20.1" | ||
tensorflow-io-gcs-filesystem = "0.34.0" | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
wheel==0.44.0 | ||
setuptools==73.0.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
absl-py==2.1.0 | ||
astunparse==1.6.3 | ||
cachetools==5.5.0 | ||
certifi==2024.8.30 | ||
charset-normalizer==3.3.2 | ||
docutils==0.20.1 | ||
flatbuffers==24.3.25 | ||
gast==0.4.0 | ||
google-auth==2.34.0 | ||
google-auth-oauthlib==1.0.0 | ||
google-pasta==0.2.0 | ||
grpcio==1.65.5 | ||
h5py==3.10.0 | ||
idna==3.8 | ||
importlib-metadata==8.4.0 | ||
keras==2.13.1 | ||
libclang==18.1.1 | ||
Markdown==3.7 | ||
MarkupSafe==2.1.5 | ||
numpy==1.24.3 | ||
oauthlib==3.2.2 | ||
opt-einsum==3.3.0 | ||
packaging==24.1 | ||
protobuf==4.25.4 | ||
pyasn1==0.6.0 | ||
pyasn1_modules==0.4.0 | ||
requests==2.32.3 | ||
requests-oauthlib==2.0.0 | ||
rsa==4.9 | ||
six==1.16.0 | ||
tensorboard==2.13.0 | ||
tensorboard-data-server==0.7.2 | ||
tensorflow==2.13.1 | ||
tensorflow-estimator==2.13.0 | ||
tensorflow-io-gcs-filesystem==0.34.0 | ||
termcolor==2.4.0 | ||
typing_extensions==4.5.0 | ||
urllib3==2.2.2 | ||
Werkzeug==3.0.4 | ||
wrapt==1.16.0 | ||
zipp==3.20.1 | ||
|