This message was deleted.
# ask-for-help
s
This message was deleted.
c
Hi @Paulo Eduardo Neves - you can choose to put the configuration file in the Bento/Container, or mount it at deployment time
p
I just want to set the log file location to a mounted dir inside my docker image. I tried to put log configurations inside the bentofile.yaml file, but the build complained that api_server is an invalid value for the file. I also tried to configure the
env
section inside the bentofile.yaml:
Copy code
env:
    - BENTOML_CONFIG_OPTIONS=api_server.file.enabled\=True\ api_server.file.directory\=/mnt/ia-modelos/GECOE/
but it didn't accepted spaces and equal symbol inside "bentoml.exceptions.BentoMLException: All value in
env
list must follow format ENV=VALUE"
@Chaoyu how do I put it inside the container?
I tried to create a `bentoml_configuration.yml`in my root dir and add it to the include section of bentofile.yaml, but it wasn't used by the container
c
you will also need to set the env var
BENTOML_CONFIG={file path to configuration yaml}
setting the BENTOML_CONFIG_OPTIONS env var should work too, not sure if this is an issue in how BentoML handles the config yaml.. let me try that out
btw you can also set that env var when running the docker container, it doesn’t have to be via the `bentofile.yaml`’s env option
@Paulo Eduardo Neves could you try use
key: value
format to set the env in
bentofile.yaml
instead of
list
?
this works as expected on my end. I did run into the issue when using
List[str]
for setting the env option
a
YOu can mount the bentoml_configuration.yaml in a container like so
Copy code
docker run -e BENTOML_CONFIG=/tmp/bentoml_configuration.yaml -v /path/to/bentoml_configuration.yaml:/tmp/bentoml_configuration.yaml