google / google/adk-python

Dockerfile should first copy requirements.txt and install dependencies before copying agent code

Abierto
#6,923 4 comentarios 0 reacciones 2 asignados Reclamado por @Jacksunwei Ver en GitHub
needs review services
Lenguaje dominante
Python
Estrellas
21.5k
Forks
4k
Merge medio
1 d 14 h
PR fusionados (30 d)
37

Descripción

https://github.com/google/adk-python/blob/0dbc37d67e928d22acef937a8f441683c88af415/src/google/adk/cli/cli_deploy.py#L203

In the current structure of the Dockerfile, the build first creates a layer with the agent's code, and then creates another layer with the installed dependencies. This order of operations causes the build process to re-create the dependencies layer after every code change, even if the list of dependencies in the requirements.txt hasn't changed.

The correct order should be:
1. copy only requirements.txt file.
2. run pip install to download dependencies
3. copy agent code

This should reduce the amount of time it takes to build container images when redeploying updated agent code, as long as the dependencies list doesn't change.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.