Open giacomov opened 2 years ago
Yes, this is a limitation with the lambda operator since we are using the custom template for modifying the bento to make it ready for deployment to AWS Lambda. I would love to figure out a workaround for you, what would be the best way to setup some time for that?
I found a workaround already :-) I modified the template within the operator itself. Not very sustainable, but works for now.
I think a rather simple fix for this would be to merge the two templates (the one from the operator and the one from the bento) before generating the Dockerfile.
Glad to hear that you fixed it! Yes, what you suggested should work in most cases—moving this issue to the lambda repo so we can take it up
Describe the bug Building bentos with the AWS Lambda operator with custom Dockerfile templates does not work. It seems that the AWS lambda operator uses its own Dockerfile template without regards on whether the model to build has its own Dockerfile template.
To Reproduce Steps to reproduce the issue:
{% endblock %} {% block SETUP_BENTO_COMPONENTS %} {{ super() }} {% endblock %}
bentoctl build -b [model name] -f deployment_config.yaml --build-arg GITHUB_TOKEN=testing --verbose
~bentoctl/operators/aws-lambda/bentoctl_lambda/create_deployable.py(61)create_deployable() -> options["dockerfile_template"] = TEMPLATE_PATH
$ git clone git@github.com:bentoml/BentoML.git && cd bentoml $ BENTOCTL_DEBUG=True BENTOML_DEBUG=TRUE python guides/quick-start/main.py
For bentoctl CLI commands, simply add the
--verbose
flag, e.g.:-->
Environment: