This message was deleted.
# ask-for-help
s
This message was deleted.
c
Hi @Fernando Camargo, yes you are right, it is linked to Bento during bentoml containerize now
You can perhaps try mounting the
~/bentoml/models
directory to the build container
so that the build process can fetch models from the model store, where you have the pytorch models saved
f
Yeah, I think it will work
👍 1
c
alternatively installing BentoML on the build container and run
bentoml containerize
should work as well, not sure if that’s hard to do with your current setup
a
This is a optimization step we did for 1.1. If you need to you can always export the bento first, then containerize it that way
f
Your first suggestion worked, @Chaoyu, thank you! For the second suggestion, it would be quite hard, because the container used is basically one with "docker in docker". It doesn't even have Python installed. I wonder if it would be possible to have an option for
bentoml containerize
to make it "dry-run". Instead of running it, it would create return the temp dir and the docker command. It would make it easier to integrate into CI/CD, which commonly gives you a special container with Docker
a
since export will include the model
f
Oh, does the export put everything into a dir?
a
wdym by “temp dir and the docker command”?
f
From what I read from the code, it seems that it creates a dir, puts everything there and then invokes the docker build
a
export will copy the model into the artefact
yes
bentoml.container.build
generate the final dockerfile, and builds everything from the tempdir
The dockerfile includes within the bento is only a minimal dockerfile to make it compatible with non buildkit setup
f
Hmmm. I'm currently deploying the model with that dockerfile. Do you think I'll have a problem with it?
a
no that dockerfile should just work
the reason for tempdir is for buildkit support, which is opt-in
f
Got it
a
If you want to get the final dockerfile that includes all of the feature bentoml containerize support, you can try
bentoml.container.get_containerfile
this will return the dockerfile we will use for the final
containerize
step
f
Alright
Thank you very much for the info