Skip to content

Instantly share code, notes, and snippets.

@filipemansano
Created January 15, 2024 05:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save filipemansano/bf441190d409a2ba8fa24d65afed374f to your computer and use it in GitHub Desktop.
Save filipemansano/bf441190d409a2ba8fa24d65afed374f to your computer and use it in GitHub Desktop.
dockerfile para criar um layer com opencv+numpy para lambda aws
# 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