Using pymeshlab in a python lamda function

185 views Asked by At

I am having trouble running the "pymeshlab" library on an amazon lambda function.

I have tried to use the pymeshlab library from an amazon lamda function (using python) and I don't quite understand how to do it as it doesn't work.

First of all I tried to zip the dependencies and I get the following error:

bm.so.6: version `GLIBC_2.27' not found (required by /opt/python/pymeshlab/lib/plugins/libfilter_icp.so))
libfilter_img_patch_param.so: libfilter_img_patch_param.so does not seem to be a Qt Plugin.
Cannot load library /opt/python/pymeshlab/lib/plugins/libfilter_img_patch_param.so: (/lib64/libm.so.6: version `GLIBC_2.27' not found (required by /opt/python/pymeshlab/lib/plugins/libfilter_img_patch_param.so))
libfilter_io_nxs.so: libfilter_io_nxs.so does not seem to be a Qt Plugin.
Cannot load library /opt/python/pymeshlab/lib/plugins/libfilter_io_nxs.so: (/lib64/libm.so.6: version `GLIBC_2.27' not found (required by /opt/python/pymeshlab/lib/plugins/libfilter_io_nxs.so))
libfilter_isoparametrization.so: libfilter_isoparametrization.so does not seem to be a Qt Plugin.
Cannot load library /opt/python/pymeshlab/lib/plugins/libfilter_isoparametrization.so: (/lib64/libm.so.6: version `GLIBC_2.27' not found (required by /opt/python/pymeshlab/lib/plugins/libfilter_isoparametrization.so))
libfilter_mutualglobal.so: libfilter_mutualglobal.so does not seem to be a Qt Plugin.
Cannot load library /opt/python/pymeshlab/lib/plugins/libfilter_mutualglobal.so: (/lib64/libm.so.6: version `GLIBC_2.27' not found (required by /opt/python/pymeshlab/lib/plugins/libfilter_mutualglobal.so))
libfilter_mutualinfo.so: libfilter_mutualinfo.so does not seem to be a Qt Plugin.
Cannot load library /opt/python/pymeshlab/lib/plugins/libfilter_mutualinfo.so: (/lib64/libm.so.6: version `GLIBC_2.27' not found (required by /opt/python/pymeshlab/lib/plugins/libfilter_mutualinfo.so))
libfilter_plymc.so: libfilter_plymc.so does not seem to be a Qt Plugin.
Cannot load library /opt/python/pymeshlab/lib/plugins/libfilter_plymc.so: (/lib64/libm.so.6: version `GLIBC_2.27' not found (required by /opt/python/pymeshlab/lib/plugins/libfilter_plymc.so))
libfilter_quality.so: libfilter_quality.so does not seem to be a Qt Plugin.
Cannot load library /opt/python/pymeshlab/lib/plugins/libfilter_quality.so: (/lib64/libm.so.6: version `GLIBC_2.27' not found (required by /opt/python/pymeshlab/lib/plugins/libfilter_quality.so))
libfilter_texture_defragmentation.so: libfilter_texture_defragmentation.so does not seem to be a Qt Plugin.
Cannot load library /opt/python/pymeshlab/lib/plugins/libfilter_texture_defragmentation.so: (/lib64/libm.so.6: version `GLIBC_2.27' not found (required by /opt/python/pymeshlab/lib/plugins/libfilter_texture_defragmentation.so))
libio_collada.so: libio_collada.so does not seem to be a Qt Plugin.
Cannot load library /opt/python/pymeshlab/lib/plugins/libio_collada.so: (/lib64/libm.so.6: version `GLIBC_2.27' not found (required by /opt/python/pymeshlab/lib/plugins/libio_collada.so))
libio_ctm.so: libio_ctm.so does not seem to be a Qt Plugin.
Cannot load library /opt/python/pymeshlab/lib/plugins/libio_ctm.so: (/lib64/libm.so.6: version `GLIBC_2.27' not found (required by /opt/python/pymeshlab/lib/plugins/libio_ctm.so))
libio_e57.so: libio_e57.so does not seem to be a Qt Plugin.
Cannot load library /opt/python/pymeshlab/lib/plugins/libio_e57.so: (/lib64/libm.so.6: version `GLIBC_2.27' not found (required by /opt/python/pymeshlab/lib/plugins/libio_e57.so))
libio_gltf.so: libio_gltf.so does not seem to be a Qt Plugin.
Cannot load library /opt/python/pymeshlab/lib/plugins/libio_gltf.so: (/lib64/libm.so.6: version `GLIBC_2.27' not found (required by /opt/python/pymeshlab/lib/plugins/libio_gltf.so))
libio_pdb.so: libio_pdb.so does not seem to be a Qt Plugin.
Cannot load library /opt/python/pymeshlab/lib/plugins/libio_pdb.so: (/lib64/libm.so.6: version `GLIBC_2.27' not found (required by /opt/python/pymeshlab/lib/plugins/libio_pdb.so))
START RequestId: ef3d4653-1f7e-4c3e-a45d-ae1ba9441590 Version: $LATEST

Next I have chosen to upload a docker container image with the following configuration:

# Use the aws python3.9 lambda image 
FROM public.ecr.aws/lambda/python:3.9

# Copy function code
COPY app.py ${LAMBDA_TASK_ROOT}

RUN yum update -y
RUN yum upgrade -y
RUN yum install -y mesa-libGL
# Install the function's dependencies using file requirements.txt
# from your project folder.
COPY requirements.txt  .
RUN  pip3 install -r requirements.txt --target "${LAMBDA_TASK_ROOT}"

# Set the CMD to your handler
CMD [ "app.handler" ]

Where requirements.txt contains:

opencv-python
pymeshlab
boto3

But I am getting the following error:

er_icp.so does not seem to be a Qt Plugin.
Cannot load library /var/task/pymeshlab/lib/plugins/libfilter_icp.so: (/lib64/libm.so.6: version `GLIBC_2.27' not found (required by /var/task/pymeshlab/lib/plugins/libfilter_icp.so))
libfilter_img_patch_param.so: libfilter_img_patch_param.so does not seem to be a Qt Plugin.
Cannot load library /var/task/pymeshlab/lib/plugins/libfilter_img_patch_param.so: (/lib64/libm.so.6: version `GLIBC_2.27' not found (required by /var/task/pymeshlab/lib/plugins/libfilter_img_patch_param.so))
libfilter_io_nxs.so: libfilter_io_nxs.so does not seem to be a Qt Plugin.
Cannot load library /var/task/pymeshlab/lib/plugins/libfilter_io_nxs.so: (/lib64/libm.so.6: version `GLIBC_2.27' not found (required by /var/task/pymeshlab/lib/plugins/libfilter_io_nxs.so))
libfilter_isoparametrization.so: libfilter_isoparametrization.so does not seem to be a Qt Plugin.
Cannot load library /var/task/pymeshlab/lib/plugins/libfilter_isoparametrization.so: (/lib64/libm.so.6: version `GLIBC_2.27' not found (required by /var/task/pymeshlab/lib/plugins/libfilter_isoparametrization.so))
libfilter_mutualglobal.so: libfilter_mutualglobal.so does not seem to be a Qt Plugin.
Cannot load library /var/task/pymeshlab/lib/plugins/libfilter_mutualglobal.so: (/lib64/libm.so.6: version `GLIBC_2.27' not found (required by /var/task/pymeshlab/lib/plugins/libfilter_mutualglobal.so))
libfilter_mutualinfo.so: libfilter_mutualinfo.so does not seem to be a Qt Plugin.
Cannot load library /var/task/pymeshlab/lib/plugins/libfilter_mutualinfo.so: (/lib64/libm.so.6: version `GLIBC_2.27' not found (required by /var/task/pymeshlab/lib/plugins/libfilter_mutualinfo.so))
libfilter_plymc.so: libfilter_plymc.so does not seem to be a Qt Plugin.
Cannot load library /var/task/pymeshlab/lib/plugins/libfilter_plymc.so: (/lib64/libm.so.6: version `GLIBC_2.27' not found (required by /var/task/pymeshlab/lib/plugins/libfilter_plymc.so))
libfilter_quality.so: libfilter_quality.so does not seem to be a Qt Plugin.
Cannot load library /var/task/pymeshlab/lib/plugins/libfilter_quality.so: (/lib64/libm.so.6: version `GLIBC_2.27' not found (required by /var/task/pymeshlab/lib/plugins/libfilter_quality.so))
libfilter_texture_defragmentation.so: libfilter_texture_defragmentation.so does not seem to be a Qt Plugin.
Cannot load library /var/task/pymeshlab/lib/plugins/libfilter_texture_defragmentation.so: (/lib64/libm.so.6: version `GLIBC_2.27' not found (required by /var/task/pymeshlab/lib/plugins/libfilter_texture_defragmentation.so))
libio_collada.so: libio_collada.so does not seem to be a Qt Plugin.
Cannot load library /var/task/pymeshlab/lib/plugins/libio_collada.so: (/lib64/libm.so.6: version `GLIBC_2.27' not found (required by /var/task/pymeshlab/lib/plugins/libio_collada.so))
libio_ctm.so: libio_ctm.so does not seem to be a Qt Plugin.
Cannot load library /var/task/pymeshlab/lib/plugins/libio_ctm.so: (/lib64/libm.so.6: version `GLIBC_2.27' not found (required by /var/task/pymeshlab/lib/plugins/libio_ctm.so))
libio_e57.so: libio_e57.so does not seem to be a Qt Plugin.
Cannot load library /var/task/pymeshlab/lib/plugins/libio_e57.so: (/lib64/libm.so.6: version `GLIBC_2.27' not found (required by /var/task/pymeshlab/lib/plugins/libio_e57.so))
libio_gltf.so: libio_gltf.so does not seem to be a Qt Plugin.
Cannot load library /var/task/pymeshlab/lib/plugins/libio_gltf.so: (/lib64/libm.so.6: version `GLIBC_2.27' not found (required by /var/task/pymeshlab/lib/plugins/libio_gltf.so))
libio_pdb.so: libio_pdb.so does not seem to be a Qt Plugin.
Cannot load library /var/task/pymeshlab/lib/plugins/libio_pdb.so: (/lib64/libm.so.6: version `GLIBC_2.27' not found (required by /var/task/pymeshlab/lib/plugins/libio_pdb.so))
START RequestId: 22a15a2c-53b5-4723-be1b-903185f3623d Version: $LATEST
2022-11-30T11:56:51.747Z 22a15a2c-53b5-4723-be1b-903185f3623d Task timed out after 3.05 seconds

Could someone help me with the correct configuration to make the library work correctly?

0

There are 0 answers