BentoML icon indicating copy to clipboard operation
BentoML copied to clipboard

feature: Allow passing docker run arguments in host_bento

Open mkmenta opened this issue 2 years ago • 2 comments

Feature request

Hi!

I think it would be very useful to have the possibility to pass arguments in the docker run of host_bento. That is, to have the possibility to pass command arguments in run_bento_server_container here.

Right now the possibility of passing arguments is only supported for the "containerize" phase with the container_mode_options. It would be nice to have something similar but for the docker run.

Motivation

This feature would be especially useful to pass environment variables with secrets during the run of the service container.

Other

I wouldn't mind helping with the implementation if you also think that it is an important feature to add.

mkmenta avatar Jul 10 '23 09:07 mkmenta

we are yet to decide on how we want to provide a testing API for bentoml atm. We had some discussion in the past internally, but currently this is within our backlog. It would be great if you can provide a usecase for using this, since host_bento is currently still considered as internal API

aarnphm avatar Jul 10 '23 13:07 aarnphm

I see... I began using host_bento because I saw it in the repo examples and I found it very useful.

In my case, I am facing a situation where I need to add some secrets and credentials as environment variables during the docker run of the service container. I need to run some requests to an external service as a pre-processing before running the model inference. However, I can't do that right now in host_bento because it does not allow passing extra arguments to the docker run.

mkmenta avatar Jul 11 '23 10:07 mkmenta