Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 125 additions & 0 deletions a/agno/Dockerfiles/2.6.3_ubi9.7/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
96 changes: 96 additions & 0 deletions a/agno/Dockerfiles/2.6.3_ubi9.7/agno_v2.6.3.patch
Original file line number Diff line number Diff line change
@@ -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"
8 changes: 8 additions & 0 deletions a/agno/Dockerfiles/2.6.3_ubi9.7/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
set -e

source /build/agno/.venv/bin/activate

echo "Starting agno..."

exec bash
Loading
Loading