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. I've gone through all of them (currently 19, initially 20), and found that except for "EdgeCraftRAG" Dockerfile.server file, only unique part in each container is just the small application Python file (and FFmpeg addition for "DocSum").

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

That will greatly speed up their building, and greatly reduce the resulting disk usage as new base image is shared between container images.

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!

@eero-t
Copy link
Contributor Author

eero-t commented Jan 20, 2025

Rebased to main and resolved all conflicts. Only difference to earlier Dockerfile contents is "DocSum" including now FFmpeg. Updated description accordingly.

@eero-t
Copy link
Contributor Author

eero-t commented Feb 5, 2025

Base container PR opea-project/GenAIComps#1127 is merged.

Before this PR can be merged:

  • the resulting base container image need to be added to nightly build images,
  • pushed to registry used by CI (in this / GenAIComps repo), and
  • pushed also to DockerHub OPEA project.

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