Skip to content

Commit a5ecf26

Browse files
Added build-script and Dockerfile for agno v2.6.3
1 parent d5952c4 commit a5ecf26

8 files changed

Lines changed: 938 additions & 0 deletions

File tree

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# stage 1 - builder
2+
FROM registry.access.redhat.com/ubi9/ubi:9.7 AS builder
3+
4+
WORKDIR /build
5+
6+
ENV PACKAGE_NAME=agno
7+
ENV PACKAGE_VERSION=v2.6.3
8+
ENV AGNO_PATCH=https://raw.githubusercontent.com/ppc64le/build-scripts/master/a/agno/${PACKAGE_NAME}_${PACKAGE_VERSION}.patch
9+
ENV IBM_WHEEL_INDEX=https://wheels.developerfirst.ibm.com/ppc64le/linux
10+
11+
# Install System Dependencies
12+
RUN yum install -y \
13+
git make wget python3.12 python3.12-devel python3.12-pip \
14+
gcc gcc-c++ gcc-gfortran \
15+
openssl openssl-devel \
16+
libffi libffi-devel pkgconf-pkg-config \
17+
autoconf automake libtool m4 \
18+
cmake unzip \
19+
openblas-devel \
20+
zlib-devel bzip2-devel xz-devel libjpeg-turbo-devel \
21+
&& yum clean all && rm -rf /var/cache/yum
22+
23+
# Install Rust
24+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
25+
ENV PATH="/root/.cargo/bin:${PATH}"
26+
27+
# Install uv
28+
RUN python3.12 -m pip install --upgrade pip && \
29+
python3.12 -m pip install uv
30+
ENV PATH="/root/.local/bin:/usr/local/bin:${PATH}"
31+
32+
#Copy patch
33+
RUN wget $AGNO_PATCH
34+
35+
# Clone Agno
36+
RUN git clone https://github.com/agno-agi/agno
37+
WORKDIR /build/agno
38+
39+
# Checkout version
40+
RUN git checkout ${PACKAGE_VERSION}
41+
RUN git apply /build/${PACKAGE_NAME}_${PACKAGE_VERSION}.patch
42+
43+
# Create virtual environment
44+
RUN uv venv .venv --python python3.12
45+
RUN .venv/bin/python -m ensurepip
46+
RUN .venv/bin/python -m pip install --upgrade pip setuptools wheel
47+
ENV VENV_PYTHON=/build/agno/.venv/bin/python
48+
49+
# Install base deps
50+
RUN uv pip install -r libs/agno/requirements.txt \
51+
--extra-index-url $IBM_WHEEL_INDEX \
52+
--index-strategy unsafe-best-match \
53+
--no-cache-dir
54+
55+
RUN uv pip install -e libs/agno[dev] \
56+
--extra-index-url $IBM_WHEEL_INDEX \
57+
--index-strategy unsafe-best-match \
58+
--no-cache-dir
59+
60+
RUN uv pip install -r libs/agno_infra/requirements.txt \
61+
--extra-index-url $IBM_WHEEL_INDEX \
62+
--index-strategy unsafe-best-match \
63+
--no-cache-dir
64+
65+
RUN uv pip install -e libs/agno_infra[dev] \
66+
--extra-index-url $IBM_WHEEL_INDEX \
67+
--index-strategy unsafe-best-match \
68+
--no-cache-dir
69+
70+
# Build SQLite 3.45
71+
RUN wget https://www.sqlite.org/2024/sqlite-autoconf-3450000.tar.gz && \
72+
tar xzf sqlite-autoconf-3450000.tar.gz && \
73+
cd sqlite-autoconf-3450000 && \
74+
./configure --prefix=/usr/local --enable-shared && \
75+
make -j$(nproc) && \
76+
make install && \
77+
cd /build && \
78+
rm -rf sqlite-autoconf-3450000*
79+
80+
# Configure SQLite environment for builder stage
81+
RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/sqlite3.conf && \
82+
ldconfig
83+
84+
RUN rm -rf /root/.cache \
85+
/root/.local/share/uv \
86+
/tmp/*
87+
88+
RUN find /build/agno/.venv -type f -name '*.pyc' -delete && \
89+
find /build/agno/.venv -type d -name '__pycache__' -exec rm -rf {} + && \
90+
rm -rf /build/agno/.venv/share \
91+
/build/agno/.venv/include
92+
93+
# Stage 2 - Runtime
94+
FROM registry.access.redhat.com/ubi9/ubi:9.7
95+
96+
WORKDIR /build/agno
97+
98+
RUN yum install -y \
99+
gcc gcc-c++ make \
100+
python3.12-devel \
101+
libffi-devel \
102+
openssl-devel \
103+
zlib-devel \
104+
bzip2-devel \
105+
xz-devel \
106+
openblas-devel \
107+
pkgconfig \
108+
git \
109+
&& yum clean all
110+
111+
# Copy entire /usr/local from builder (includes SQLite 3.45 and uv)
112+
COPY --from=builder /usr/local /usr/local
113+
114+
# Configure linker for SQLite libraries
115+
RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/sqlite3.conf && \
116+
ldconfig
117+
118+
COPY --from=builder /build/agno /build/agno
119+
120+
ENV PATH="/build/agno/.venv/bin:$PATH"
121+
122+
COPY entrypoint.sh /entrypoint.sh
123+
RUN chmod +x /entrypoint.sh
124+
125+
CMD ["/entrypoint.sh"]
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
diff --git a/libs/agno/pyproject.toml b/libs/agno/pyproject.toml
2+
index 710e0379f..cf67a4c9d 100644
3+
--- a/libs/agno/pyproject.toml
4+
+++ b/libs/agno/pyproject.toml
5+
@@ -103,7 +103,7 @@ agentql = ["agentql"]
6+
apify = ["apify-client"]
7+
arxiv = ["arxiv"]
8+
brave = ["brave-search"]
9+
-browserbase = ["browserbase", "playwright"]
10+
+browserbase = ["browserbase"] # removed playwright as not available for power
11+
cartesia = ["cartesia"]
12+
confluence = ["atlassian-python-api"]
13+
docling = ["docling"]
14+
@@ -234,14 +234,14 @@ models = [
15+
16+
# All tools
17+
tools = [
18+
- "agno[apify]",
19+
+ #"agno[apify]", # calling impit which inturn has unstable http3 dependency
20+
"agno[arxiv]",
21+
# "agno[brave]", # It clashes with other dependencies
22+
"agno[exa]",
23+
"agno[seltz]",
24+
"agno[cartesia]",
25+
"agno[ddg]",
26+
- "agno[duckdb]",
27+
+ #"agno[duckdb]", # pip install
28+
"agno[newspaper]",
29+
"agno[youtube]",
30+
"agno[firecrawl]",
31+
@@ -260,20 +260,20 @@ tools = [
32+
"agno[webex]",
33+
"agno[mcp]",
34+
"agno[browserbase]",
35+
- "agno[agentql]",
36+
- "agno[opencv]",
37+
+ #"agno[agentql]", # uses playwright
38+
+ #"agno[opencv]", # pip install
39+
"agno[parallel]",
40+
"agno[salesforce]",
41+
"agno[scrapegraph]",
42+
"agno[valyu]",
43+
- "agno[yfinance]",
44+
+ #"agno[yfinance]", # unsupported arch error
45+
"agno[confluence]",
46+
"agno[docling]",
47+
"agno[notion]",
48+
"agno[oxylabs]",
49+
"agno[zep]",
50+
"agno[mem0]",
51+
- "agno[memori]",
52+
+ #"agno[memori]", # faiss-cpu not available for power
53+
"agno[google_bigquery]",
54+
"agno[psycopg]",
55+
"agno[redshift]",
56+
@@ -297,11 +297,11 @@ storage = [
57+
# All vector databases
58+
vectordbs = [
59+
"agno[pgvector]",
60+
- "agno[chromadb]",
61+
- "agno[lancedb]",
62+
+ #"agno[chromadb]", # installed using build-script
63+
+ #"agno[lancedb]", # not available for power
64+
"agno[qdrant]",
65+
"agno[couchbase]",
66+
- "agno[cassandra]",
67+
+ #"agno[cassandra]", pip install
68+
"agno[mongodb]",
69+
"agno[singlestore]",
70+
"agno[weaviate]",
71+
@@ -310,7 +310,7 @@ vectordbs = [
72+
"agno[pinecone]",
73+
"agno[surrealdb]",
74+
"agno[upstash]",
75+
- "agno[pylance]",
76+
+ #"agno[pylance]", # not available for power
77+
"agno[redis]",
78+
]
79+
80+
@@ -350,14 +350,14 @@ tests = [
81+
"agno[integration-tests]",
82+
"twine",
83+
"build",
84+
- "grpcio>=1.76.0",
85+
+ #"grpcio>=1.76.0", # installed using build-script
86+
]
87+
88+
# Models integration test dependencies
89+
integration-tests = [
90+
"exa_py>=2.0.0",
91+
"ddgs",
92+
- "yfinance",
93+
+ #"yfinance", # not available for power
94+
"sqlalchemy",
95+
"Pillow",
96+
"fastmcp"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
set -e
3+
4+
source /build/agno/.venv/bin/activate
5+
6+
echo "Starting agno..."
7+
8+
exec bash

0 commit comments

Comments
 (0)