Skip to content
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

Use GenAIComp base image to simplify Dockerfiles & reduce image sizes #1369

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

eero-t
Copy link
Contributor

@eero-t eero-t commented Jan 8, 2025

Description

Current application Dockerfiles copy other Dockerfiles, install unnecessary libraries (e.g. Perl), causing resulting images to be rather huge, many hundreds of MBs.

I've gone through all of them (20), and found that except for "EdgeCraftRAG" Dockerfile.server file, only unique part in each container is just the small application Python file.

This changes all the other 19 application Dockerfiles to use common base image: opea-project/GenAIComps#1127

This will greatly speed up their building, and greatly reduce the resulting disk usage. Compared to current application images, new base image is just half of their size, and shared between applications using it.

Note: image size shown by docker & crictl include also sizes of underlying images, but disk space is actually used only once per shared base image, so the real disk cost of each additional application image will be just few tens of KBs.

Issues

There are several tickets about large disk usage, both for GenAIExamples and GenAIComps repo.

Type of change

  • Others (enhancement, documentation, validation, etc.)

Dependencies

No new 3rd party dependencies, but this PR will fail until the new GenAIComps base image is available in CI.

Tests

Did manual testing that ChatQnA & DocSum images build when GenAIComps image is available, and that those 2 applications still work fine.

For the other applications, I'm relying on CI tests in: #1031

Future work

This solves only application image size aspect. There are many other images which disk usage can and should still be optimized (app UIs, GenAIComps backend service images etc).

Copy link

github-actions bot commented Jan 8, 2025

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Files

@eero-t
Copy link
Contributor Author

eero-t commented Jan 8, 2025

Setting to draft state until base image is available: opea-project/GenAIComps#1127

@mkbhanda
Copy link
Collaborator

mkbhanda commented Jan 8, 2025

Delightfully clean!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants