-
Notifications
You must be signed in to change notification settings - Fork 174
@AkshataABhat: Dockerfile enhancement: multistage build #995
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
base: main
Are you sure you want to change the base?
Conversation
This issue aims to refactor the current Dockerfile to use a multistage build approach. The motivation for this change is to: 1. Reduce final image size by excluding unnecessary build-time dependencies (e.g., gcc, libpython3-dev, etc.) 2. Enhance maintainability by clearly separating build and runtime concerns ``` Size of the current docker image: 3.82GB Size of the docker image after multi-stage build: 1.06GB ``` Closes #990
/gcbrun exp -n ab -ag |
@AkshataABhat, unfortunately the experiment failed: |
@DonggeLiu I think I've figured out the issue. The python binary doesn't seem to exist in the second stage. I will correct this. |
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.
Overall I'm not a huge fan of this -- do we really need it? I feel the complexity of the set up increases using multistage builds and I don't see a significant win from splitting it up.
At the moment, there's no significant improvement except a decrease in image size, but this can help isolate build dependencies from the runtime environment in the future, when support for fine-tuned or custom models is added. |
I agree to for the complexity point |
Contributed by @AkshataABhat via #991.