Giter Club home page Giter Club logo

aws-lambda-python-opencv-layer's Introduction

Introduction

This repository provides pre-built headless OpenCV for AWS Lambda. Python OpenCV includes native code libraries, I compiled and build these libraries using a Linux development machine so that the binaries are compatible with Amazon Linux. Once this layer is applied, you can use the layer to host your own algorithms on lambda for Python OpenCV.

Python Version

For each Python directory, it was created as follows:

Support Pre-built Python 3.7.10

based on Numpy==1.21.5

  • opencv-python-headless-3.4.17.61
  • opencv-python-headless-4.0.1.24
  • opencv-python-headless-4.1.2.30
  • opencv-python-headless-4.2.0.34
  • opencv-python-headless-4.3.0.38
  • opencv-python-headless-4.4.0.46
  • opencv-python-headless-4.5.5.62

Support Pre-built Python 3.8.16

based on Numpy==1.24.2

  • opencv-python-headless-3.4.18.65
  • opencv-python-headless-4.1.2.30
  • opencv-python-headless-4.2.0.34
  • opencv-python-headless-4.3.0.38
  • opencv-python-headless-4.4.0.46
  • opencv-python-headless-4.5.5.64
  • opencv-python-headless-4.6.0.66
  • opencv-python-headless-4.7.0.68

Support Pre-built Python 3.9.16

based on Numpy==1.24.2

  • opencv-python-headless-3.4.18.65
  • opencv-python-headless-4.4.0.46
  • opencv-python-headless-4.5.5.64
  • opencv-python-headless-4.6.0.66
  • opencv-python-headless-4.7.0.68

Apply Layer

  1. Upload the opencv-python-headless.zip file to Amazon S3.

  2. Open the Layers page of the Lambda console.

  3. Choose Create layer.

  4. Under Layer configuration, for Name, enter a name for your layer.

  5. To upload OpenCV Python Headless layer

  6. Choose Upload a file from Amazon S3. Then, for Amazon S3 link URL, enter a link to the file.

  7. Choose Create.

Structure

Example file structure for the opencv-python-headless library:

opencv-python-headless.{major}.{minor}.{revision}.{package_version}.zip
  └ python/bin
  └ python/cv2
  └ python/numpy
  └ python/numpy.libs
  └ python/numpy-1.21.5.dist-info
  └ python/opencv_python_headless-{major}.{minor}.{revision}.{package_version}.dist-info
  └ python/opencv_python_headless.libs

Another layer

The following link show how you can structure the folders in your layer .zip archive.

Authors

Daehee Yun([email protected])

aws-lambda-python-opencv-layer's People

Contributors

076923 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

aws-lambda-python-opencv-layer's Issues

Build instructions

Can you share the instructions you followed to build these layers? In particular I'm interested in the specific packages you had to include.

No module named numpy.core._multiarray_umath

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  • The Python version is: Python3.9 from "/var/lang/bin/python3.9"
  • The NumPy version is: "1.24.2"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: No module named 'numpy.core._multiarray_umath'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.