-
Notifications
You must be signed in to change notification settings - Fork 195
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
Why containers use hundreds of MBs for Vim/Perl/OpenGL? #225
Comments
"GenAIComps" repo
|
Full Perl version gets added as There are so many dependencies between "GenAIComps" and "GenAIExamples" repos that I think it would make sense to merge them. Then Another alternative would be having separate "fetch" phase in the Dockerfile which would install Git, do |
Dropping
|
Tried doing Git cloning in separate step and copying just repo content to final image:
=> It reduced final image size by additional 108MB, to 366MB, which is half of the original 727MB size. |
Will validate for all the examples and then incorporate this. |
All common dependencies should be on a shared base layer, see: opea-project/GenAIComps#265 That way these optimizations need to be done only once. |
will improve it in the future |
Once the base images have been cleaned of extra content, it's easy to generate additional, separate "devel" images where those (Vim, Perl, Git etc) tools are added back. All it needs is:
Which both are pretty trivial... |
Instead of removing
( |
please submit pr |
Ok, here's an example of doing that for GenAIExamples repo containers: #1031 @kevinintel Do you want me to write example PR also for GenAIComps repo containers? |
Many of the
Dockerfile
s install Vim and/or Mesa OpenGL/X packages:Why?
They take lot of space in the containers; Mesa's LLVM dependency alone adds >100MB, Vim adds 40MB, and I suspect they're reason why full Perl gets installed:
If containers really need text-editor, e.g.
nano
would be user-friendlier and much smaller (1MB) thanvim
.The text was updated successfully, but these errors were encountered: