-
Notifications
You must be signed in to change notification settings - Fork 810
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
feature: split instruction used to set up environment in order to support caching when building Docker #3577
Comments
I would suggest using a cache remote repository, with I will take this into consideration as we are in the process of improving the build workflow. |
@aarnphm Thank you for replying. Since we copy the entire current folder in before installing the environment, the layer created will permanently be changed when the new version of the bento is updated. So the layer that holds the I see you have some commands to cache the
To be more specific, I am having the two versions of Bento created from the same source code as follows: bentoml list
Tag Size Creation Time Path
movie_recommender:25svplelmkcu3tdd 9.33 MiB 2023-01-03 19:54:02 ~/bentoml/bentos/movie_recommender/25svplelmkcu3tdd
movie_recommender:vjsd7yelmw2vtgiq 9.33 MiB 2023-01-03 19:54:02 ~/bentoml/bentos/movie_recommender/vjsd7yelmw2vtgiq
iris_classifier:3mfgmqelmkemhbza 24.00 KiB 2023-01-03 19:34:00 ~/bentoml/bentos/iris_classifier/3mfgmqelmkemhbza Because the above two versions are generated with the same source code and they have same This makes us spend a lot of unnecessary memory to store these two images as well as the image update process will be much longer when we have to almost completely pull back a layer that accounts for more than 98% of the size of the image. I think improving this point will greatly help with CI/CD based deployments or simply users will pull new images much faster. Hope you can consider this idea. If there is something I don't understand correctly about how BentoML works, please let me know. Sorry about my bad English :( |
Feature request
Change the Docker instruction by splitting it into two parts:
models
directorymodels
directory.Motivation
Currently, the instruction in the Dockerfile will copy the entire current directory before installing the libraries using the file
/home/bentoml/bento/env/python/install.sh
. This causes the entire installation of libraries to always be re-run, which may not be necessary if we only change the model or the runner.It should be like:
Other
No response
The text was updated successfully, but these errors were encountered: