10000 feat: Add support for installing OS level agent dependencies via requirements.sh by runa · Pull Request #1524 · google/adk-python · GitHub
[go: up one dir, main page]

Skip to content

feat: Add support for installing OS level agent dependencies via requirements.sh #1524

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
Next Next commit
feat: Add support for installing agent dependencies via requirements.…
…sh in Dockerfile generation for Cloud Run deployments
  • Loading branch information
runa committed Jun 18, 2025
commit e59c5f0092add5dec117b720adb78d6b6a9f7bd1
11 changes: 11 additions & 0 deletions src/google/adk/cli/cli_deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@
COPY "agents/{app_name}/" "/app/agents/{app_name}/"
{install_agent_deps}

USER root
{install_agent_deps_script}
USER myuser

# Copy agent - End

EXPOSE {port}
Expand Down Expand Up @@ -178,6 +182,12 @@ def to_cloud_run(
if os.path.exists(requirements_txt_path)
else ''
)
requirements_sh_path = os.path.join(agent_src_path, 'requirements.sh')
install_agent_deps_script = (
f'RUN sh /app/agents/{app_name}/requirements.sh'
if os.path.exists(requirements_sh_path)
else ''
)
click.echo('Copying agent source code complete.')

# create Dockerfile
Expand All @@ -190,6 +200,7 @@ def to_cloud_run(
port=port,
command='web' if with_ui else 'api_server',
install_agent_deps=install_agent_deps,
install_agent_deps_script=install_agent_deps_script,
service_option=_get_service_option_by_adk_version(
adk_version,
session_service_uri,
Expand Down
0