Hi, Do you know how I can pass argument to the doc...
# ask-for-help
j
Hi, Do you know how I can pass argument to the docker image while deploying to BentoCloud? With
bentoml containerize
, I can use the
--build-arg
option, but is there an equivalent for the
bentoml deploy
command? Thanks for your help.
j
What are the things that you would like to pass in?
j
I just want to pass a directory name, ex:
bentoml containerize --build-arg SRC_DIR=some-dir-name
I have a docker template that looks like this:
Copy code
{% extends bento_base_template %}

{% block SETUP_BENTO_COMPONENTS %}


ARG SRC_DIR

COPY --chown=bentoml:bentoml ./src/$SRC_DIR/pyproject.toml ./src/$SRC_DIR/poetry.lock ./env/python/src/

# other things here 
{% endblock %}
j
We dont have a build args equivalent w BentoCloud. Would using
ENV
works for you? environment variables can be injected into build phase
using the
--env
flag
j
Yes, env var would work as well for me. Is it compatible with the envs key of bentofile.yaml?
j
yes
you either use the envs key, the
--env
in CLI, as well as through the UI in bentocloud
j
ok perfect, thanks for your help