-
Notifications
You must be signed in to change notification settings - Fork 147
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
Add Dockerfile for comps-base image #1127
base: main
Are you sure you want to change the base?
Conversation
With current The image size resulting from this new base image + the ChatQnA Dockerfile example, is 436MB. => image size halves, as it drops installation of redundant package (Mesa 3D libs, Git and their deps, e.g. Perl). Every additional application image will take only fraction of that, because base layer already exists. Docker / crictl still will list the combines size though ( |
Earlier opea-project/GenAIExamples#1031 PR showed that CI tests for all apps pass even without these extra packages. That's why this new base image does not include them. |
Several Dockerfiles in "GenAIExamples" include also following which I've dropped from the base:
Because |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @eero-t for this PR.
My feedback is only a minor one.
This is good and should be merged ASAP. Only then examples can start using it. |
Rebased to |
Next steps would be:
However, I have no clue how to achieve that, so unfortunately somebody else needs to do that. Only after that, CI can pass for opea-project/GenAIExamples#1369 so that it can also be merged. |
While merged is block, @eero-t, what about squashing everything into the same commit? Just a suggestion, not a requirement. |
Signed-off-by: Eero Tamminen <[email protected]>
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks @eero-t!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This design LGTM, just need more time to update CICD.
Description
Add Docker file for a base image that can be used by GenAIExamples applications.
With a shared base image, CI can do test builds much faster, they take much less space locally and in registry, and images sharing the same base download much faster.
With this, almost all of the 20 application Dockerfiles, e.g. this one:
https://github.com/opea-project/GenAIExamples/blob/main/ChatQnA/Dockerfile
Can be reduced just to:
(For releases,
docker build
command can be given e.g.--build-arg=BASE_TAG=1.2
option.)Issues
This is first part in fixing image sizes and how much time and disk space is used for them. There are multiple tickets about the image sizes.
Type of change
Dependencies
n/a
Tests
Tested manually that the added Dockerfile, and ChatQnA & DocSum Dockerfiles relying on it build, and that the resulting ChatQnA & DocSum applications work fine.
Next steps
Somebody (else) needs to: