|
| 1 | +## Introduction |
| 2 | + |
| 3 | +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. Also, This layer file contains version `Numpy==1.21.5`. These libraries were created in `Python 3.7.10`. |
| 4 | + |
| 5 | +## Apply Layer |
| 6 | + |
| 7 | +1. Upload the `opencv-python-headless.zip` file to Amazon S3. |
| 8 | + |
| 9 | +2. Open the Layers page of the Lambda console. |
| 10 | + |
| 11 | +3. Choose Create layer. |
| 12 | + |
| 13 | +4. Under Layer configuration, for Name, enter a name for your layer. |
| 14 | + |
| 15 | +5. To upload OpenCV Python Headless layer |
| 16 | + |
| 17 | +6. Choose Upload a file from Amazon S3. Then, for Amazon S3 link URL, enter a link to the file. |
| 18 | + |
| 19 | +7. Choose Create. |
| 20 | + |
| 21 | +## Support Pre-built Version |
| 22 | + |
| 23 | +- opencv-python-headless-3.4.17.61 |
| 24 | +- opencv-python-headless-4.0.1.24 |
| 25 | +- opencv-python-headless-4.1.2.30 |
| 26 | +- opencv-python-headless-4.2.0.34 |
| 27 | +- opencv-python-headless-4.3.0.38 |
| 28 | +- opencv-python-headless-4.4.0.46 |
| 29 | +- opencv-python-headless-4.5.5.62 |
| 30 | + |
| 31 | +## Structure |
| 32 | + |
| 33 | +Example file structure for the `opencv-python-headless` library: |
| 34 | +``` |
| 35 | +opencv-python-headless.{major}.{minor}.{revision}.{package_version}.zip |
| 36 | + └ python/bin |
| 37 | + └ python/cv2 |
| 38 | + └ python/numpy |
| 39 | + └ python/numpy.libs |
| 40 | + └ python/numpy-1.21.5.dist-info |
| 41 | + └ python/opencv_python_headless-{major}.{minor}.{revision}.{package_version}.dist-info |
| 42 | + └ python/opencv_python_headless.libs |
| 43 | +``` |
| 44 | + |
| 45 | +## Another layer |
| 46 | + |
| 47 | +The following [link][lambda-link] show how you can structure the folders in your layer .zip archive. |
| 48 | + |
| 49 | +[lambda-link]: https://docs.aws.amazon.com/en_es/lambda/latest/dg/configuration-layers.html |
| 50 | + |
| 51 | +## Authors |
| 52 | + |
| 53 | +Daehee Yun(s076923@gmail.com) |
0 commit comments