You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using python-opencv-headless for runtime python 3.8 will throw segmentation fault on invocation. Do you know why is this happening?
Dockerfile:
`FROM amazonlinux
WORKDIR /
RUN yum update -y
Install Python 3.8
RUN yum install gcc openssl-devel bzip2-devel libffi-devel wget tar gzip make -y
RUN wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
RUN tar -xzvf Python-3.7.0.tgz
WORKDIR /Python-3.7.0
RUN ./configure --enable-optimizations
RUN make install
Install Python 3.7
RUN yum install python3 zip -y
Install Python packages
RUN mkdir /packages
RUN echo "opencv-python-headless" >> /packages/requirements.txt
RUN mkdir -p /packages/opencv-python-3.7/python/lib/python3.7/site-packages
RUN mkdir -p /packages/opencv-python-3.8/python/lib/python3.8/site-packages
RUN echo "numpy" >> /packages/requirements.txt
RUN echo "pdf2image" >> /packages/requirements.txt
RUN pip3.7 install pip --upgrade
RUN pip3.7 install -r /packages/requirements.txt -t /packages/opencv-python-3.7/python/lib/python3.7/site-packages
Create zip files for Lambda Layer deployment
WORKDIR /packages/opencv-python-3.7/
RUN zip -r9 /packages/cv2-python37.zip .
WORKDIR /packages/
RUN rm -rf /packages/opencv-python-3.7/
`
The text was updated successfully, but these errors were encountered:
Using this package on Serverless helped me streamline this whole process and reduce the package size as well. Would definitely recommend checking it out. Make sure to leave the strip flag to false
When using python-opencv-headless for runtime python 3.8 will throw segmentation fault on invocation. Do you know why is this happening?
Dockerfile:
`FROM amazonlinux
WORKDIR /
RUN yum update -y
Install Python 3.8
RUN yum install gcc openssl-devel bzip2-devel libffi-devel wget tar gzip make -y
RUN wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
RUN tar -xzvf Python-3.7.0.tgz
WORKDIR /Python-3.7.0
RUN ./configure --enable-optimizations
RUN make install
Install Python 3.7
RUN yum install python3 zip -y
Install Python packages
RUN mkdir /packages
RUN echo "opencv-python-headless" >> /packages/requirements.txt
RUN mkdir -p /packages/opencv-python-3.7/python/lib/python3.7/site-packages
RUN mkdir -p /packages/opencv-python-3.8/python/lib/python3.8/site-packages
RUN echo "numpy" >> /packages/requirements.txt
RUN echo "pdf2image" >> /packages/requirements.txt
RUN pip3.7 install pip --upgrade
RUN pip3.7 install -r /packages/requirements.txt -t /packages/opencv-python-3.7/python/lib/python3.7/site-packages
Create zip files for Lambda Layer deployment
WORKDIR /packages/opencv-python-3.7/
RUN zip -r9 /packages/cv2-python37.zip .
WORKDIR /packages/
RUN rm -rf /packages/opencv-python-3.7/
`
The text was updated successfully, but these errors were encountered: