Conflicting (kind of) information about bentoml serve #3560
-
BentoML Version: 1.0.11 Now, the API reference for bentoml cli at https://docs.bentoml.org/en/latest/reference/cli.html#bentoml-serve says: BENTO is the serving target, it can be the import as:
Note that the last option says 'internal & debug use only' But, isn't a Bento built with 'bentoml build'?? Can we not export that Bento, then import it & serve it in production mode? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I agree, its super confusing. Also, why can't we start a service from a |
Beta Was this translation helpful? Give feedback.
-
Not sure if I understand this fully, but you can
You can serve from a path, but it is a anti-pattern, hence the Bento should be managed by the BentoML's bento store, and hence the recommended way is
You can export the bento, import somewhere else and serve it bentoml export bento:tag ./exported.bento Then you can send that bentoml import /path/to/exported.bento
bentoml serve bento:tag Hope this clarifies some of the documentation. We will probably need to clean and sync up our documentation. |
Beta Was this translation helpful? Give feedback.
Not sure if I understand this fully, but you can
bentoml serve /path/to/bento
,bentoml serve bento_name:tag
You can serve from a path, but it is a anti-pattern, hence the
internal and debug use only
. This is mainly for testing out the bento and make sure you package and bundle correct files.B…