WFP-VAM / prism-app

PRISM is an interactive map-based dashboard that simplifies the integration of geospatial data on hazards, along with information on socioeconomic vulnerability
MIT License
48 stars 34 forks source link

Speed up api docker build time #964

Open ericboucher opened 11 months ago

ericboucher commented 11 months ago

Provide a clear and concise description of what you want to happen.

Docker build time is quite slow atm, in part due to playwright. Could we re-order docker build steps for smarter caching? i.e. install playwright before the rest of the packages so that if we change one package we don't have to re-do these steps?

Thoughts @laurentS ?

Is there anything else you can add about the proposal? You might want to link to related issues here, if you haven't already.

No response

laurentS commented 11 months ago

I looked into this a bit while working on #929, mostly by using caching in docker buildx. Some steps would drop to much shorter build times (say 2s instead of 20+), but I never managed to get the entire chain to work correctly. playwright is annoying in that it expects to install the python package, and THEN to install the heavy stuff which is going to change less often.

What I would try: