Skip to content

Reduce total downloads and image sizes to a fraction by using intermediate image(s) #265

@eero-t

Description

@eero-t

E.g. "ChatQnA" service is based on 9 microservices, of which several use images with the same large python libraries (like PyTorch) duplicated on them.

By building/using intermediate image containing the shared dependencies:

  • Large dependencies are downloaded / built only once during image builds
  • Rest of the images are small as those deps are on shared layer, instead bloating sizes of all the images
  • Smaller images mean first run of the given containers (on given host) being much faster
  • CVEs for them are easier to handle as fix is needed only for single Dockerfile
    • With automation taking care of updating dependent images

I.e. it will take significantly less bandwidth, disk space and time, which all are cost reductions on rented clusters. And helps improving container security.

As an example, here's documentation on how Kubeflow images are layered: https://www.kubeflow.org/docs/components/notebooks/container-images/

(Once this ticket has been fixed, similar doc+graph for OPEA images and their layering would be nice.)

Metadata

Metadata

Labels

Backlogfeatures in backlogaitcefeatureNew feature or request

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions