-
Notifications
You must be signed in to change notification settings - Fork 9
fix: use user-template to generate dockerfile #40
Conversation
bentoctl_lambda/create_deployable.py
Outdated
) | ||
) | ||
# Make docker file with user template | ||
docker_options_for_lambda = DockerOptions(dockerfile_template=BENTOML_USER_TEMPLATE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to use amazonlinux
here, and also set a python version for that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
amazonlinux is not a requirement actually but we should pin the python version. we can use the same one from the bento
Co-authored-by: Aaron Pham <[email protected]>
@@ -3,7 +3,10 @@ | |||
{% block SETUP_BENTO_ENTRYPOINT %} | |||
EXPOSE 3000 | |||
|
|||
RUN --mount=type=cache,mode=0777,target=/root/.cache/pip pip install awslambdaric==2.0.0 mangum==0.12.3 | |||
RUN --mount=type=cache,mode=0777,target=/root/.cache/pip \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how would we start a bento again? since you are overwritting ENTRYPOINT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the CMD command is configured my the terraform template but I'll put it back here since that is less confusing
bentoctl_lambda/create_deployable.py
Outdated
# Make docker file with user template | ||
docker_options_for_lambda = DockerOptions(dockerfile_template=BENTOML_USER_TEMPLATE) | ||
dockerfile_generated = generate_dockerfile( | ||
docker_options_for_lambda.with_defaults(), use_conda=False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this going to use the python version on the bentoctl build machine instead of the bento's python version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep that is a bug. Thanks for pointing it out!
since we have the python version in bento.yaml
we will use that python version when generating the dockerfile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will take over from here
Signed-off-by: Aaron Pham <[email protected]>
Signed-off-by: Aaron Pham <[email protected]>
Signed-off-by: Aaron Pham <[email protected]>
Signed-off-by: Aaron Pham <[email protected]>
Signed-off-by: Aaron Pham <[email protected]>
No description provided.