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

chore: Remove Python from final image since it is only used to convert keras to tensorflow #60

Closed
wants to merge 1 commit into from

Conversation

GolanLevy
Copy link
Contributor

@GolanLevy GolanLevy commented Oct 23, 2023

... which we may not need, hence reducing the image size from 2.14Gb to 256Mb

#59

… need, reducing the image size from 2.14Gb to 256Mb

Signed-off-by: Golan Levy <[email protected]>
@kserve-oss-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: GolanLevy
To complete the pull request process, please assign njhill after the PR has been reviewed.
You can assign the PR to them by writing /assign @njhill in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@GolanLevy GolanLevy closed this Oct 23, 2023
@ckadner
Copy link
Member

ckadner commented Nov 23, 2023

@GolanLevy -- I see you closed this PR. Your criticism has merit though. Maybe we could introduce another build stage to install the conversion script, but only copy the minimally required python packages into the final minimal image?

@ckadner ckadner self-requested a review November 23, 2023 22:21
@ckadner ckadner changed the title python is solely used to convert keras to tensorflow, which we do not… chore: Remove Python from final image since it is only used to convert keras to tensorflow Nov 23, 2023
@GolanLevy
Copy link
Contributor Author

@ckadner I opened this PR by mistake (wanted to test it first on my repo, which worked btw).
Before implementing any special logic, I suggest to revise the original need for the conversion script. If we decide that the script is unnecessary, we can just eliminate it and all the python packages.
The conversion script converts model at runtime. Why is it necessary? This should not be handled as part of a production flow imo.
If a user has a Keras model, encourage him to preprocess the model (using the script) prior to serving it.

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.

Reduce size of runtime-adapter image (exclude Python/tensorflow to convert keras models)
3 participants