-
Notifications
You must be signed in to change notification settings - Fork 1
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
Docker image build fails when the flag '--no-binary pydantic' is added to requirements.txt #15
Comments
This is to reduce the size of the resulting Docker image, apparently from 974MB down to 866MB Fixes OpenDRR#15
Hey @arashmalekz, thank you for your very helpful report! --- a/Dockerfile
+++ b/Dockerfile
@@ -92,6 +92,8 @@ RUN \
&& if [ "$BUILD_DEV_IMAGE" = "true" ] ; then pip3 install -r requirements-dev.txt; fi \
# Temporary fix for elasticsearch-dsl module not available as deb package in bionic
&& pip3 install elasticsearch-dsl \
+ # Reduce size of Docker image by not installing pydantic binary package
+ && pip3 install --no-binary pydantic pydantic \
&& pip3 install -e . \
# OGC schemas local setup
&& mkdir /schemas.opengis.net \
Hope this will make the Docker image small enough (969MB → 861MB before compression) for AWS Lambda. Please test and let me know! If it is still too large, I think there could be some more tricks to reduce the size of the Docker image further. |
This is to reduce the size of the resulting Docker image, apparently from 969MB down to 861MB Fixes OpenDRR#15
Hey @anthonyfok , sorry, I finally had a chance to look at this! |
Hey @arashmalekz, thank you so much for looking into this! (And sorry for my late reply.) Joost reminded me that we don't deploy pygeoapi on AWS Lambda any longer. If so, I was wondering if we could close this issue? Please let me know! Many thanks! |
The flag '--no-binary pydantic' is added to requirements.txt on a new line so it doesn't generate pydantic binaries and make the Lambda deployment package smaller. However, if I have this flag and try to build the Pygeoapi Docker image, I get the following error:
The text was updated successfully, but these errors were encountered: