Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache pip install in python Dockerfiles #461

Merged
merged 5 commits into from
Nov 7, 2023

Conversation

mdavis-xyz
Copy link
Contributor

@mdavis-xyz mdavis-xyz commented Nov 3, 2023

Fixes #460

I'm not sure if I should copy models before app.py, or app.py first. It probably doesn't matter. (Models is larger. But does it change more often?)

Note that I haven't tested these changes, because they're simple. I'm assuming CICD will tell me if I've broken stuff.

@mdavis-xyz mdavis-xyz requested a review from a team as a code owner November 3, 2023 17:04
@mdavis-xyz mdavis-xyz requested review from bentvelj and moelasmar and removed request for a team November 3, 2023 17:04
@github-actions github-actions bot added pr/external stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels Nov 3, 2023
@mndeveci
Copy link
Contributor

mndeveci commented Nov 7, 2023

Thanks for your contribution! Can you apply same changes to other python runtimes?

@moelasmar moelasmar added this pull request to the merge queue Nov 7, 2023
Merged via the queue into aws:master with commit 9badf4c Nov 7, 2023
43 checks passed
@mdavis-xyz
Copy link
Contributor Author

mdavis-xyz commented Nov 7, 2023

I thought I did apply it to all lambda runtimes and templates (which didn't have it already). I just searched the code repo for all files with "COPY requiremnets.txt app.py ./" (or something like that.)

@mndeveci
Copy link
Contributor

mndeveci commented Nov 8, 2023

@mdavis-xyz no worries, there is this one for python3.9 for instance https://github.com/aws/aws-sam-cli-app-templates/blob/master/python3.9/hello-img/%7B%7Bcookiecutter.project_name%7D%7D/hello_world/Dockerfile which is not included in this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/external stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimize docker images for newer python
3 participants