You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.
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:
Create a bentoml with a custom Dockerfile template, for example:
Look for the Dockerfile produced by the command (under /tmp/* as printed by the command). It won't contain the added instructions (in this case, the GITHUB_TOKEN arg)
This happens because of this line for the AWS lambda operator:
where TEMPLATE_PATH points to a template within the operator itself (in my case, PosixPath('~/bentoctl/operators/aws-lambda/bentoctl_lambda/aws_lambda/template.j2')
Expected behavior
The model is built honoring the custom Dockerfile template included in the bento (or the dockerfile included in the bento under env/docker/Dockerfile).
Environment:
OS: Ubuntu 20.04
Python Version 3.8.12
BentoML Version 1.0.10
Bentoctl Version 0.3.4 (same problem also installing the HEAD of the repo)
The text was updated successfully, but these errors were encountered:
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.
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:
/tmp/*
as printed by the command). It won't contain the added instructions (in this case, the GITHUB_TOKEN arg)This happens because of this line for the AWS lambda operator:
where
TEMPLATE_PATH
points to a template within the operator itself (in my case,PosixPath('~/bentoctl/operators/aws-lambda/bentoctl_lambda/aws_lambda/template.j2')
Expected behavior
The model is built honoring the custom Dockerfile template included in the bento (or the dockerfile included in the bento under
env/docker/Dockerfile
).Environment:
The text was updated successfully, but these errors were encountered: