diff --git a/a/agno/Dockerfiles/2.6.3_ubi9.7/Dockerfile b/a/agno/Dockerfiles/2.6.3_ubi9.7/Dockerfile new file mode 100644 index 0000000000..3a4ab608c3 --- /dev/null +++ b/a/agno/Dockerfiles/2.6.3_ubi9.7/Dockerfile @@ -0,0 +1,125 @@ +# stage 1 - builder +FROM registry.access.redhat.com/ubi9/ubi:9.7 AS builder + +WORKDIR /build + +ENV PACKAGE_NAME=agno +ENV PACKAGE_VERSION=v2.6.3 +ENV AGNO_PATCH=https://raw.githubusercontent.com/ppc64le/build-scripts/master/a/agno/${PACKAGE_NAME}_${PACKAGE_VERSION}.patch +ENV IBM_WHEEL_INDEX=https://wheels.developerfirst.ibm.com/ppc64le/linux + +# Install System Dependencies +RUN yum install -y \ + git make wget python3.12 python3.12-devel python3.12-pip \ + gcc gcc-c++ gcc-gfortran \ + openssl openssl-devel \ + libffi libffi-devel pkgconf-pkg-config \ + autoconf automake libtool m4 \ + cmake unzip \ + openblas-devel \ + zlib-devel bzip2-devel xz-devel libjpeg-turbo-devel \ + && yum clean all && rm -rf /var/cache/yum + +# Install Rust +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +ENV PATH="/root/.cargo/bin:${PATH}" + +# Install uv +RUN python3.12 -m pip install --upgrade pip && \ + python3.12 -m pip install uv +ENV PATH="/root/.local/bin:/usr/local/bin:${PATH}" + +#Copy patch +RUN wget $AGNO_PATCH + +# Clone Agno +RUN git clone https://github.com/agno-agi/agno +WORKDIR /build/agno + +# Checkout version +RUN git checkout ${PACKAGE_VERSION} +RUN git apply /build/${PACKAGE_NAME}_${PACKAGE_VERSION}.patch + +# Create virtual environment +RUN uv venv .venv --python python3.12 +RUN .venv/bin/python -m ensurepip +RUN .venv/bin/python -m pip install --upgrade pip setuptools wheel +ENV VENV_PYTHON=/build/agno/.venv/bin/python + +# Install base deps +RUN uv pip install -r libs/agno/requirements.txt \ + --extra-index-url $IBM_WHEEL_INDEX \ + --index-strategy unsafe-best-match \ + --no-cache-dir + +RUN uv pip install -e libs/agno[dev] \ + --extra-index-url $IBM_WHEEL_INDEX \ + --index-strategy unsafe-best-match \ + --no-cache-dir + +RUN uv pip install -r libs/agno_infra/requirements.txt \ + --extra-index-url $IBM_WHEEL_INDEX \ + --index-strategy unsafe-best-match \ + --no-cache-dir + +RUN uv pip install -e libs/agno_infra[dev] \ + --extra-index-url $IBM_WHEEL_INDEX \ + --index-strategy unsafe-best-match \ + --no-cache-dir + +# Build SQLite 3.45 +RUN wget https://www.sqlite.org/2024/sqlite-autoconf-3450000.tar.gz && \ + tar xzf sqlite-autoconf-3450000.tar.gz && \ + cd sqlite-autoconf-3450000 && \ + ./configure --prefix=/usr/local --enable-shared && \ + make -j$(nproc) && \ + make install && \ + cd /build && \ + rm -rf sqlite-autoconf-3450000* + +# Configure SQLite environment for builder stage +RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/sqlite3.conf && \ + ldconfig + +RUN rm -rf /root/.cache \ + /root/.local/share/uv \ + /tmp/* + +RUN find /build/agno/.venv -type f -name '*.pyc' -delete && \ + find /build/agno/.venv -type d -name '__pycache__' -exec rm -rf {} + && \ + rm -rf /build/agno/.venv/share \ + /build/agno/.venv/include + +# Stage 2 - Runtime +FROM registry.access.redhat.com/ubi9/ubi:9.7 + +WORKDIR /build/agno + +RUN yum install -y \ + gcc gcc-c++ make \ + python3.12-devel \ + libffi-devel \ + openssl-devel \ + zlib-devel \ + bzip2-devel \ + xz-devel \ + openblas-devel \ + pkgconfig \ + git \ + && yum clean all + +# Copy entire /usr/local from builder (includes SQLite 3.45 and uv) +COPY --from=builder /usr/local /usr/local + +# Configure linker for SQLite libraries +RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/sqlite3.conf && \ + ldconfig + +COPY --from=builder /build/agno /build/agno + +ENV PATH="/build/agno/.venv/bin:$PATH" + +COPY entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh + +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/a/agno/Dockerfiles/2.6.3_ubi9.7/agno_v2.6.3.patch b/a/agno/Dockerfiles/2.6.3_ubi9.7/agno_v2.6.3.patch new file mode 100644 index 0000000000..61b6f5816e --- /dev/null +++ b/a/agno/Dockerfiles/2.6.3_ubi9.7/agno_v2.6.3.patch @@ -0,0 +1,96 @@ +diff --git a/libs/agno/pyproject.toml b/libs/agno/pyproject.toml +index 710e0379f..cf67a4c9d 100644 +--- a/libs/agno/pyproject.toml ++++ b/libs/agno/pyproject.toml +@@ -103,7 +103,7 @@ agentql = ["agentql"] + apify = ["apify-client"] + arxiv = ["arxiv"] + brave = ["brave-search"] +-browserbase = ["browserbase", "playwright"] ++browserbase = ["browserbase"] # removed playwright as not available for power + cartesia = ["cartesia"] + confluence = ["atlassian-python-api"] + docling = ["docling"] +@@ -234,14 +234,14 @@ models = [ + + # All tools + tools = [ +- "agno[apify]", ++ #"agno[apify]", # calling impit which inturn has unstable http3 dependency + "agno[arxiv]", + # "agno[brave]", # It clashes with other dependencies + "agno[exa]", + "agno[seltz]", + "agno[cartesia]", + "agno[ddg]", +- "agno[duckdb]", ++ #"agno[duckdb]", # pip install + "agno[newspaper]", + "agno[youtube]", + "agno[firecrawl]", +@@ -260,20 +260,20 @@ tools = [ + "agno[webex]", + "agno[mcp]", + "agno[browserbase]", +- "agno[agentql]", +- "agno[opencv]", ++ #"agno[agentql]", # uses playwright ++ #"agno[opencv]", # pip install + "agno[parallel]", + "agno[salesforce]", + "agno[scrapegraph]", + "agno[valyu]", +- "agno[yfinance]", ++ #"agno[yfinance]", # unsupported arch error + "agno[confluence]", + "agno[docling]", + "agno[notion]", + "agno[oxylabs]", + "agno[zep]", + "agno[mem0]", +- "agno[memori]", ++ #"agno[memori]", # faiss-cpu not available for power + "agno[google_bigquery]", + "agno[psycopg]", + "agno[redshift]", +@@ -297,11 +297,11 @@ storage = [ + # All vector databases + vectordbs = [ + "agno[pgvector]", +- "agno[chromadb]", +- "agno[lancedb]", ++ #"agno[chromadb]", # installed using build-script ++ #"agno[lancedb]", # not available for power + "agno[qdrant]", + "agno[couchbase]", +- "agno[cassandra]", ++ #"agno[cassandra]", pip install + "agno[mongodb]", + "agno[singlestore]", + "agno[weaviate]", +@@ -310,7 +310,7 @@ vectordbs = [ + "agno[pinecone]", + "agno[surrealdb]", + "agno[upstash]", +- "agno[pylance]", ++ #"agno[pylance]", # not available for power + "agno[redis]", + ] + +@@ -350,14 +350,14 @@ tests = [ + "agno[integration-tests]", + "twine", + "build", +- "grpcio>=1.76.0", ++ #"grpcio>=1.76.0", # installed using build-script + ] + + # Models integration test dependencies + integration-tests = [ + "exa_py>=2.0.0", + "ddgs", +- "yfinance", ++ #"yfinance", # not available for power + "sqlalchemy", + "Pillow", + "fastmcp" diff --git a/a/agno/Dockerfiles/2.6.3_ubi9.7/entrypoint.sh b/a/agno/Dockerfiles/2.6.3_ubi9.7/entrypoint.sh new file mode 100644 index 0000000000..e4a4b71e22 --- /dev/null +++ b/a/agno/Dockerfiles/2.6.3_ubi9.7/entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set -e + +source /build/agno/.venv/bin/activate + +echo "Starting agno..." + +exec bash \ No newline at end of file diff --git a/a/agno/LICENSE b/a/agno/LICENSE new file mode 100644 index 0000000000..5c304d1a4a --- /dev/null +++ b/a/agno/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/a/agno/README.md b/a/agno/README.md new file mode 100644 index 0000000000..18c7b14247 --- /dev/null +++ b/a/agno/README.md @@ -0,0 +1,36 @@ +## Build + +```bash +docker build -t agno:latest . +``` + +--- + +## Run + +```bash +docker run -it agno:latest +``` + +--- + +## Using the Container + +> **Note:** The container drops you into a pre-configured `uv` virtual environment located at `/build/agno/.venv`. You are free to install any additional dependencies as needed: +> +> - **System packages** (e.g. compilers, libraries): +> ```bash +> yum install +> ``` +> - **Python packages** (installed into the agno venv): +> ```bash +> uv pip install +> ``` + +To see all available agno CLI commands, run: + +```bash +agno --help +``` + +--- \ No newline at end of file diff --git a/a/agno/agno_2.6.3_ubi9.7.sh b/a/agno/agno_2.6.3_ubi9.7.sh new file mode 100644 index 0000000000..e1621e44d1 --- /dev/null +++ b/a/agno/agno_2.6.3_ubi9.7.sh @@ -0,0 +1,356 @@ +#!/bin/bash -ex +# ----------------------------------------------------------------------------- +# +# Package : agno +# Version : v2.6.3 +# Source repo : https://github.com/agno-agi/agno +# Tested on : UBI 9.7 +# Ci-Check : True +# Language : Python +# Script License: Apache License, Version 2 or later +# Maintainer : Prachi Gaonkar +# +# Disclaimer : This script has been tested in root mode on given +# ========== platform using the mentioned version of the package. +# It may not work as expected with newer versions of the +# package and/or distribution. In such case, please +# contact "Maintainer" of this script. +# ------------------------------------------------------------------------------ + +WORKDIR=$(pwd) +PACKAGE_NAME=agno +SCRIPT_PACKAGE_VERSION=v2.6.3 +PACKAGE_VERSION=${1:-${SCRIPT_PACKAGE_VERSION}} +PACKAGE_URL=https://github.com/agno-agi/agno +PACKAGE_DIR=agno +SCRIPT=$(readlink -f $0) +SCRIPT_PATH=$(dirname $SCRIPT) + +# Utilizing IBM ppc64le wheel index as a fallback for missing PyPI wheels +IBM_WHEEL_INDEX=https://wheels.developerfirst.ibm.com/ppc64le/linux + +# ----------------------------------------------------------------------------- +# STEP 1 — SYSTEM DEPENDENCIES +# ----------------------------------------------------------------------------- +echo ">>> Installing System Dependencies..." +yum install -y \ + git make wget python3.12 python3.12-devel python3.12-pip \ + gcc gcc-c++ gcc-gfortran openssl openssl-devel \ + libffi libffi-devel sqlite sqlite-devel pkgconf-pkg-config \ + autoconf automake libtool m4 \ + cmake unzip \ + openblas-devel \ + zlib-devel bzip2-devel xz-devel libjpeg-turbo-devel \ + --allowerasing + +echo "INFO: System dependencies installed." + +# ----------------------------------------------------------------------------- +# STEP 2 — RUST TOOLCHAIN +# ----------------------------------------------------------------------------- +echo ">>> Installing Rust toolchain..." +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +export PATH="$HOME/.cargo/bin:$PATH" +source "$HOME/.cargo/env" + +echo "INFO: Rust toolchain installed — $(rustc --version)." + +# ----------------------------------------------------------------------------- +# STEP 3 — UV PACKAGE MANAGER +# ----------------------------------------------------------------------------- +echo ">>> Installing uv package manager..." +python3.12 -m pip install --upgrade pip +python3.12 -m pip install uv +# Ensure uv is in PATH +export PATH="$HOME/.local/bin:/usr/local/bin:$PATH" + +echo "INFO: uv installed — $(uv --version)." + +# ----------------------------------------------------------------------------- +# STEP 4 — CLONE & CHECKOUT AGNO REPOSITORY +# ----------------------------------------------------------------------------- +echo ">>> Cloning repository..." +cd $WORKDIR +if [ -d "$PACKAGE_DIR" ]; then + echo ">>> Removing existing directory $PACKAGE_DIR..." + rm -rf "$PACKAGE_DIR" +fi +git clone $PACKAGE_URL +cd $PACKAGE_DIR +# Derived paths — defined here so they are available for all later steps +AGNO_DIR=$(pwd) +VENV_DIR="$AGNO_DIR/.venv" +VENV_PYTHON="$VENV_DIR/bin/python" +AGNO_DEPS_DIR="$AGNO_DIR/libs/agno" +AGNO_INFRA_DEPS_DIR="$AGNO_DIR/libs/agno_infra" + +git checkout $PACKAGE_VERSION +# apply patch +git apply ${SCRIPT_PATH}/${PACKAGE_NAME}_${SCRIPT_PACKAGE_VERSION}.patch + +echo "INFO: Repository checked out and patched successfully." + +# ----------------------------------------------------------------------------- +# STEP 5 — CREATE VIRTUAL ENVIRONMENT +# ----------------------------------------------------------------------------- +echo ">>> Creating virtual environment..." +uv venv .venv --python python3.12 +VENV_PYTHON="$(pwd)/.venv/bin/python" + +# ----------------------------------------------------------------------------- +# STEP 6 — INSTALL AGNO CORE & INFRA DEPENDENCIES +# ----------------------------------------------------------------------------- +# Note: uv will automatically read pyproject.toml and install all pinned dependecies +source .venv/bin/activate +if ! uv pip install -r ${AGNO_DEPS_DIR}/requirements.txt \ + --extra-index-url $IBM_WHEEL_INDEX \ + --index-strategy unsafe-best-match; then + echo "ERROR: $PACKAGE_NAME - Requirement installation failed." + exit 1 +fi + +if ! uv pip install -e ${AGNO_DEPS_DIR}[dev] \ + --extra-index-url $IBM_WHEEL_INDEX \ + --index-strategy unsafe-best-match; then + echo "ERROR: $PACKAGE_NAME - Dev Dependency installation failed." + exit 1 +fi + +if ! uv pip install -r ${AGNO_INFRA_DEPS_DIR}/requirements.txt \ + --extra-index-url $IBM_WHEEL_INDEX \ + --index-strategy unsafe-best-match; then + echo "ERROR: $PACKAGE_NAME - Infra Requirement installation failed" + exit 1 +fi + +if ! uv pip install -e ${AGNO_INFRA_DEPS_DIR}[dev] \ + --extra-index-url $IBM_WHEEL_INDEX \ + --index-strategy unsafe-best-match; then + echo "ERROR: $PACKAGE_NAME - Infra Dev Dependency installation failed" +fi + +# 7. Verify CLI +if ! agno --help >/dev/null; then + echo "ERROR: $PACKAGE_NAME - agno CLI failed to execute" + exit 2 +else + echo "INFO: agno CLI executed successfully" +fi + +deactivate + +# ----------------------------------------------------------------------------- +# STEP 7 — BUILD & INSTALL grpcio +# ----------------------------------------------------------------------------- +cd $WORKDIR +echo ">>>> Installing grpcio" +wget https://raw.githubusercontent.com/ppc64le/build-scripts/refs/heads/master/g/grpcio/grpcio_1.76.0_ubi_9.6.sh +sed -i '/git submodule update --init --recursive/a \ +\n# Setting up agno venv\nVENV_PYTHON="'"$AGNO_DIR"'/.venv/bin/python"\n' grpcio_1.76.0_ubi_9.6.sh +sed -i 's|pip3 install -r requirements.txt|uv pip install --python $VENV_PYTHON -r requirements.txt|' grpcio_1.76.0_ubi_9.6.sh +sed -i 's|pip3 install --force-reinstall Cython==0.29.37|uv pip install --python $VENV_PYTHON --force-reinstall Cython==0.29.37|' grpcio_1.76.0_ubi_9.6.sh +sed -i 's|pip3 install \. --no-build-isolation|uv pip install --python $VENV_PYTHON . --no-build-isolation|' grpcio_1.76.0_ubi_9.6.sh +sed -i 's|python3 -c|$VENV_PYTHON -c|' grpcio_1.76.0_ubi_9.6.sh +chmod +x grpcio_1.76.0_ubi_9.6.sh + +ret=0 +./grpcio_1.76.0_ubi_9.6.sh v1.78.0 || ret=$? +if [ $ret -ne 0 ] +then + echo "grpcio failed to download and install" + exit 1 +else + echo "INFO: grpcio installed successfully" + rm -rf grpc + rm -f grpcio_1.76.0_ubi_9.6.sh +fi + +# ----------------------------------------------------------------------------- +# STEP 8 — BUILD & INSTALL SQLite >= 3.35 (required by chromadb) +# ----------------------------------------------------------------------------- +echo ">>>> Installing SQLite 3.45 ....." +SQLITE_VERSION=3450000 +wget https://www.sqlite.org/2024/sqlite-autoconf-${SQLITE_VERSION}.tar.gz +tar xzf sqlite-autoconf-${SQLITE_VERSION}.tar.gz +cd sqlite-autoconf-${SQLITE_VERSION} + +./configure --prefix=/usr/local/sqlite --enable-shared +make -j$(nproc) +make install + +cd $WORKDIR +echo ">>> Configuring SQLite environment..." +# Register with system linker (CRITICAL) +echo "/usr/local/sqlite/lib" > /etc/ld.so.conf.d/sqlite3.conf +ldconfig +export PKG_CONFIG_PATH=/usr/local/sqlite/lib/pkgconfig:$PKG_CONFIG_PATH +export LD_LIBRARY_PATH=/usr/local/sqlite/lib:$LD_LIBRARY_PATH +export CFLAGS="-I/usr/local/sqlite/include" +export LDFLAGS="-L/usr/local/sqlite/lib" +echo ">>> Verifying SQLite..." +/usr/local/sqlite/bin/sqlite3 --version +pkg-config --modversion sqlite3 +rm -rf sqlite-autoconf-* + +#Before chromadb installation +echo ">>>> Cleaning yum cache...." +yum clean all +rm -rf /var/cache/yum/* + +# ----------------------------------------------------------------------------- +# STEP 9 — BUILD & INSTALL chromadb +# ----------------------------------------------------------------------------- +echo ">>>> Installing chromadb" +wget https://raw.githubusercontent.com/ppc64le/build-scripts/refs/heads/master/c/chromadb/chromadb_1.0.20_ubi_9.6.sh +wget https://raw.githubusercontent.com/ppc64le/build-scripts/refs/heads/master/c/chromadb/chromadb_1.0.20_ubi_9.6.patch +# Inject VENV_PYTHON dynamically + SQLite environment +echo "INFO: Patching chromadb script — injecting venv, SQLite env, skipping redundant yum installs, replacing python3.11 with uv pip, removing upstream tests..." +sed -i " +/^set -e/a VENV_PYTHON=\"$AGNO_DIR/.venv/bin/python\";\ +export PKG_CONFIG_PATH=/usr/local/sqlite/lib/pkgconfig:\$PKG_CONFIG_PATH;\ +export LD_LIBRARY_PATH=/usr/local/sqlite/lib:\$LD_LIBRARY_PATH;\ +export CFLAGS=\"-I/usr/local/sqlite/include\";\ +export LDFLAGS=\"-L/usr/local/sqlite/lib -Wl,-rpath,/usr/local/sqlite/lib\"; +s|yum -y install gcc g++ cmake autoconf unzip make git python3.11 python3.11-pip python3.11-devel|echo 'Skipping yum install - packages already present'|; +s|python3.11 -m pip install --upgrade maturin cffi patchelf setuptools wheel build|uv pip install --python \$VENV_PYTHON --upgrade maturin cffi patchelf setuptools wheel build|; +s|python3.11 -m pip install -r requirements.txt --prefer-binary --extra-index-url https://wheels.developerfirst.ibm.com/ppc64le/linux|uv pip install --python \$VENV_PYTHON -r requirements.txt --extra-index-url https://wheels.developerfirst.ibm.com/ppc64le/linux --index-strategy unsafe-best-match|; +s|python3.11 -m pip install \.|uv pip install --python \$VENV_PYTHON .|; +/# Test wheel after installation/,\$d +" chromadb_1.0.20_ubi_9.6.sh +chmod +x chromadb_1.0.20_ubi_9.6.sh + +# Verify environment before build +echo ">>> Pre-chromadb environment check..." +echo "PKG_CONFIG_PATH: $PKG_CONFIG_PATH" +echo "LD_LIBRARY_PATH: $LD_LIBRARY_PATH" +pkg-config --modversion sqlite3 || echo "WARNING: pkg-config cannot find sqlite3" + +ret=0 +./chromadb_1.0.20_ubi_9.6.sh || ret=$? +if [ $ret -ne 0 ] +then + echo "ERROR: chromadb failed to download and install" + exit 1 +else + echo "INFO: chromadb installed successfully" + rm -rf chroma + rm -rf chromadb_1.0.20_ubi_9.6.sh + rm -rf chromadb_1.0.20_ubi_9.6.patch +fi + +# The following packages are installed individually (not via agno[tests]) because +# they cause OOM errors when resolved alongside the full test extras in one pass. +cd $AGNO_DIR +if ! uv pip install opencv-python; then + echo "ERROR: opencv failed to install" + exit 1 +else + echo "INFO: opencv-python installed succesfully" +fi + +if ! uv pip install couchbase; then + echo "ERROR: couchbase failed to Install" + exit 1 +else + echo "INFO: couchbase installed successfully" +fi + +if ! uv pip install duckdb; then + echo "ERROR: duckdb failed to install" + exit 1 +else + echo "INFO: duckdb installed successfully" + +fi + +if ! uv pip install cassandra-driver==3.29.2 \ + --extra-index-url $IBM_WHEEL_INDEX \ + --index-strategy unsafe-best-match; then + echo "ERROR: cassandra driver failed to install" + exit 1 +else + echo "INFO: cassandra driver installed successfully" +fi + +if ! uv pip install cassio \ + --extra-index-url $IBM_WHEEL_INDEX \ + --index-strategy unsafe-best-match; then + echo "ERROR: cassio failed to install" + exit 1 +else + echo "INFO: cassio installed succesfully" +fi + +# ----------------------------------------------------------------------------- +# STEP 10 — INSTALL REMAINING TEST DEPENDENCIES +# ----------------------------------------------------------------------------- +if ! uv pip install -e ${AGNO_DEPS_DIR}[tests] \ + --extra-index-url $IBM_WHEEL_INDEX \ + --index-strategy unsafe-best-match; then + echo "ERROR: $PACKAGE_NAME - Test Dependency installation failed." + exit 1 +else + echo "INFO : $PACKAGE_NAME - Test Dependency installed successfully" +fi + +if ! uv pip install brave-search; then + echo "ERROR: brave failed to install" + exit 1 +else + echo "INFO: brave installed successfully" +fi +# downgrading seltz to 0.2.0 +if ! uv pip install seltz==0.2.0; then + echo "ERROR: seltz failed to install" + exit 1 +else + echo "INFO: seltz installed successfully" +fi + +if ! uv pip install httpx==0.28.1; then + echo "ERROR: httpx failed to installed" + exit 1 +else + echo "INFO: httpx installed successfully" +fi + +uv pip install tree-sitter-language-pack==0.13.0 + + +# ----------------------------------------------------------------------------- +# STEP 10 — RUN UNIT TESTS +# ----------------------------------------------------------------------------- +cd $AGNO_DIR +source .venv/bin/activate + +echo "============= Running Unit Tests for $PACKAGE_NAME =================" + +echo "INFO: The following test files are excluded due to unavailable or platform-incompatible dependencies:" +echo "INFO: - test_client_deepcopy.py (litellm — skipped for parity with x86)" +echo "INFO: - test_docling_reader.py (docling installed but skipped — torchvision native ops (nms) missing on ppc64le, causing docling import failures via transformers)" +echo "INFO: - test_browserbase.py (browserbase — skipped, playwright not available for Power architecture)" +echo "INFO: - test_crawl4ai.py (crawl4ai — skipped for parity with x86)" +echo "INFO: - test_docling.py (docling installed but skipped — torchvision native ops (nms) missing on ppc64le, causing docling import failures via transformers)" +echo "INFO: - test_lancedb.py (lancedb — skipped, lancedb not available for Power architecture)" + +# libs/agno/tests/unit/tools/test_scrapegraph.py was skipped in (x86) agno github actions, included here since test cases are passing + +ret=0 +pytest libs/agno/tests/unit \ + --ignore=libs/agno/tests/unit/models/litellm \ + --ignore=libs/agno/tests/unit/reader/test_docling_reader.py \ + --ignore=libs/agno/tests/unit/tools/test_browserbase.py \ + --ignore=libs/agno/tests/unit/tools/test_crawl4ai.py \ + --ignore=libs/agno/tests/unit/tools/test_docling.py \ + --ignore=libs/agno/tests/unit/vectordb/test_lancedb.py || ret=$? + +if [ $ret -ne 0 ]; then + echo "ERROR: [$PACKAGE_NAME] Unit tests FAILED." + exit 2 +fi + +echo "" +echo "============================================================" +echo " SUCCESS: $PACKAGE_NAME $PACKAGE_VERSION — Build & Tests Passed" +echo "============================================================" +exit 0 \ No newline at end of file diff --git a/a/agno/agno_v2.6.3.patch b/a/agno/agno_v2.6.3.patch new file mode 100644 index 0000000000..61b6f5816e --- /dev/null +++ b/a/agno/agno_v2.6.3.patch @@ -0,0 +1,96 @@ +diff --git a/libs/agno/pyproject.toml b/libs/agno/pyproject.toml +index 710e0379f..cf67a4c9d 100644 +--- a/libs/agno/pyproject.toml ++++ b/libs/agno/pyproject.toml +@@ -103,7 +103,7 @@ agentql = ["agentql"] + apify = ["apify-client"] + arxiv = ["arxiv"] + brave = ["brave-search"] +-browserbase = ["browserbase", "playwright"] ++browserbase = ["browserbase"] # removed playwright as not available for power + cartesia = ["cartesia"] + confluence = ["atlassian-python-api"] + docling = ["docling"] +@@ -234,14 +234,14 @@ models = [ + + # All tools + tools = [ +- "agno[apify]", ++ #"agno[apify]", # calling impit which inturn has unstable http3 dependency + "agno[arxiv]", + # "agno[brave]", # It clashes with other dependencies + "agno[exa]", + "agno[seltz]", + "agno[cartesia]", + "agno[ddg]", +- "agno[duckdb]", ++ #"agno[duckdb]", # pip install + "agno[newspaper]", + "agno[youtube]", + "agno[firecrawl]", +@@ -260,20 +260,20 @@ tools = [ + "agno[webex]", + "agno[mcp]", + "agno[browserbase]", +- "agno[agentql]", +- "agno[opencv]", ++ #"agno[agentql]", # uses playwright ++ #"agno[opencv]", # pip install + "agno[parallel]", + "agno[salesforce]", + "agno[scrapegraph]", + "agno[valyu]", +- "agno[yfinance]", ++ #"agno[yfinance]", # unsupported arch error + "agno[confluence]", + "agno[docling]", + "agno[notion]", + "agno[oxylabs]", + "agno[zep]", + "agno[mem0]", +- "agno[memori]", ++ #"agno[memori]", # faiss-cpu not available for power + "agno[google_bigquery]", + "agno[psycopg]", + "agno[redshift]", +@@ -297,11 +297,11 @@ storage = [ + # All vector databases + vectordbs = [ + "agno[pgvector]", +- "agno[chromadb]", +- "agno[lancedb]", ++ #"agno[chromadb]", # installed using build-script ++ #"agno[lancedb]", # not available for power + "agno[qdrant]", + "agno[couchbase]", +- "agno[cassandra]", ++ #"agno[cassandra]", pip install + "agno[mongodb]", + "agno[singlestore]", + "agno[weaviate]", +@@ -310,7 +310,7 @@ vectordbs = [ + "agno[pinecone]", + "agno[surrealdb]", + "agno[upstash]", +- "agno[pylance]", ++ #"agno[pylance]", # not available for power + "agno[redis]", + ] + +@@ -350,14 +350,14 @@ tests = [ + "agno[integration-tests]", + "twine", + "build", +- "grpcio>=1.76.0", ++ #"grpcio>=1.76.0", # installed using build-script + ] + + # Models integration test dependencies + integration-tests = [ + "exa_py>=2.0.0", + "ddgs", +- "yfinance", ++ #"yfinance", # not available for power + "sqlalchemy", + "Pillow", + "fastmcp" diff --git a/a/agno/build_info.json b/a/agno/build_info.json new file mode 100644 index 0000000000..9a6ba0d366 --- /dev/null +++ b/a/agno/build_info.json @@ -0,0 +1,20 @@ +{ + "maintainer": "Prachi.Gaonkar@ibm.com", + "package_name": "agno", + "github_url": "https://github.com/agno-agi/agno", + "version": "v2.6.3", + "default_branch": "master", + "build_script": "agno_2.6.3_ubi9.7.sh", + "package_dir": "a/agno", + "use_non_root_user": false, + "validate_build_script":true, + "docker_build": true, + "wheel_build" : false, + "docker_cmd": "docker build -t ${package_name}:${PACKAGE_VERSION} ${dir}", + "*": { + "dir": "2.6.3_ubi9.7", + "base_docker_image": "registry.access.redhat.com/ubi9/ubi:9.7", + "base_docker_variant": "redhat", + "build_script": "agno_2.6.3_ubi9.7.sh" + } +} \ No newline at end of file