Yatai
Yatai copied to clipboard
feature request: Allow user to set env vars or build arguments for building bentos
Is your feature request related to a problem? Please describe.
BentoML builds supports extra_index_urls
as an option, and will automatically discover username/password credentials by using pip-tools
This will break when Yatai starts build image after user pushed the bento to it.
Current workaround
User have to build a custom docker image with the credential as base_image for the bento build
# CUSTOM_DOCKER_BASE
FROM bentoml/bento-server:1.0.0a5-python3.9-debian-cudnn
ARG USERNAME
ARG PASSWORD
ENV PIP_EXTRA_INDEX_URL="https://$USERNAME:$PASSWORD@my_pypi_index.com"
And then build & push the image, and use it in the bento file
# bentofile.yaml
service: "service.py:svc"
docker:
- base_image: MY_CUSTOM_DOCKER_BASE
This workaround expose the credentials
Additional context
Slack conversation: https://bentoml.slack.com/archives/CKRANBHPH/p1646170324854479
Set this as part of org level config
Set this as part of org level config
why not bento repo level?
what is the status of this?
I do see the option to define environment variables in the building part of Yatai, but I see no ways of adding a build arg.