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
4 changes: 4 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,10 @@ jobs:
- name: Install python
run: uv python install 3.11

- name: Verify uv.lock matches pyproject.toml
working-directory: ./python
run: uv lock --check

- name: Sync dependencies
working-directory: ./python
run: uv sync --all-extras
Expand Down
15 changes: 13 additions & 2 deletions python/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### STAGE 1: uv binary
ARG UV_VERSION=0.11.15
ARG UV_VERSION=0.12.3
FROM ghcr.io/astral-sh/uv:${UV_VERSION} AS uv-bin

### STAGE 2: builder
Expand Down Expand Up @@ -53,8 +53,19 @@ ARG VERSION
RUN --mount=type=cache,target=/.kagent/cache,rw \
echo "Creating virtual environment and installing dependencies..." \
&& uv venv --python=python$TOOLS_PYTHON_VERSION \
&& uv lock && uv sync --package kagent-adk --no-editable \
&& uv sync --frozen --package kagent-adk --no-editable \
&& uv cache prune \
# The standalone CPython build bundles pip (with vendored msgpack /
# pkg_resources) in its own site-packages. The runtime only uses the venv,
# so drop it rather than shipping CVE-flagged packages that nothing imports.
&& rm -rf /python/cpython-*/lib/python*/site-packages/pip \
/python/cpython-*/lib/python*/site-packages/pip-*.dist-info \
/python/cpython-*/lib/python*/site-packages/setuptools \
/python/cpython-*/lib/python*/site-packages/setuptools-*.dist-info \
/python/cpython-*/lib/python*/site-packages/pkg_resources \
# Fail the build if pip survived (rm -rf on a non-matching glob exits 0,
# e.g. after a Python minor bump moves site-packages).
&& ! "$(uv python find)" -c "import pip" 2>/dev/null \
&& echo "Installation complete."

# Pre-create the config dir owned by the runtime user. On Agent Substrate the config is
Expand Down
4 changes: 2 additions & 2 deletions python/Dockerfile.full
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# and for sandboxed BYO agents.

### STAGE 1: uv binary
ARG UV_VERSION=0.11.15
ARG UV_VERSION=0.12.3
FROM ghcr.io/astral-sh/uv:${UV_VERSION} AS uv-bin

### STAGE 2: base os + sandbox runtime
Expand Down Expand Up @@ -98,7 +98,7 @@ ARG VERSION
RUN --mount=type=cache,target=/.kagent/cache,uid=1001,gid=1001 \
echo "Creating virtual environment and installing dependencies..." \
&& uv venv --python=python$TOOLS_PYTHON_VERSION \
&& uv lock && uv sync --package kagent-adk \
&& uv sync --frozen --package kagent-adk \
&& uv cache prune \
&& echo "Installation complete."

Expand Down
1 change: 1 addition & 0 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ constraint-dependencies = [
"aiohttp>=3.14.3",
"cryptography>=50.0.0",
"httplib2>=0.32.0",
"idna>=3.15",
"jaraco-context>=6.1.0",
"joserfc>=1.6.8",
"mako>=1.3.12",
Expand Down
7 changes: 4 additions & 3 deletions python/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading