Created
January 15, 2024 05:56
-
-
Save filipemansano/bf441190d409a2ba8fa24d65afed374f to your computer and use it in GitHub Desktop.
dockerfile para criar um layer com opencv+numpy para lambda aws
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://gallery.ecr.aws/lambda/python | |
FROM public.ecr.aws/lambda/python:3.11-x86_64 | |
RUN yum install zip -y | |
RUN python3.11 -m venv /var/venv | |
ENV PATH="/var/venv/bin:$PATH" | |
RUN pip install numpy opencv-python-headless | |
RUN mkdir -p /var/layer/python/lib/python3.11/site-packages | |
RUN cp -r /var/venv/lib/python3.11/site-packages/* /var/layer/python/lib/python3.11/site-packages/ | |
WORKDIR /var/layer | |
RUN zip -r numpy_layer.zip python |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment