Skip to content

ADK 1.10 adk deploy to cloud run does not work on Cloudtop or Linux VM #2499

@wadave

Description

@wadave

** Please make sure you read the contribution guide and file the issues in the right place. **
Contribution guide.

Describe the bug
When you use https://google.github.io/adk-docs/deploy/cloud-run/#full-command-with-optional-flags to deploy adk agent to cloud run from Cloudtop. It gives errors:

Step 11/16 : COPY "agents/vertexai-agent/" "/app/agents/vertexai-agent/"
 ---> 068e32ffad5b
Step 12/16 : RUN pip install -r "/app/agents/vertexai-agent/requirements.txt"
 ---> Running in 331d1b0c27bb
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not open requirements file: [Errno 13] Permission denied: '/app/agents/vertexai-agent/requirements.txt'

To Reproduce
https://google.github.io/adk-docs/deploy/cloud-run/#full-command-with-optional-flags
Follow the instruction on Cloudtop, you will reproduce the errors

Expected behavior
The deployment succeed, and you can use the url.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS] Linux
  • Python version(python -V): 3.12
  • ADK version(pip show google-adk): 1.10

Model Information:
During the deployment, the terminal shows:

Start generating Cloud Run source files in /tmp/cloud_run_deploy_src/20250812_222401
Copying agent source code...
Copying agent source code completed.
Creating Dockerfile...
Creating Dockerfile complete: /tmp/cloud_run_deploy_src/20250812_222401/Dockerfile
Deploying to Cloud Run...

This tmp folder is mounted to RAM, it might cause the issue.

Additional context
Folder structure:

|── project folder
|  ├── agents
│    └── your-agent
│       ├── agent.py
│       ├── __init__.py
│       └── requirements.txt

The adk deploy command needs to run at project folder.

Current workaround solutions:

  1. clone repo to local machine, then use adk deploy command
    or
  2. on cloudtop, use 'gcloud run deploy` command

Potential solution:

During the adk deployment process, a Dockerfile is created. In this file, it changes ownership before copying command:

# Change ownership of /app to myuser
RUN chown -R myuser:myuser /app

Suggest to change the ownership during the copying:

# Copy agent and set ownership to myuser
COPY --chown=myuser:myuser "agents/your-agent/" "/app/agents/your-agent/"

# Run pip install as myuser
RUN pip install -r "/app/agents/your-agent/requirements.txt"

Metadata

Metadata

Assignees

Labels

bot triaged[Bot] This issue is triaged by ADK bottools[Component] This issue is related to tools

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions