Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libjpeg.so.8 not found when using with AWS Lambda #34

Open
nico00 opened this issue May 10, 2018 · 6 comments
Open

libjpeg.so.8 not found when using with AWS Lambda #34

nico00 opened this issue May 10, 2018 · 6 comments

Comments

@nico00
Copy link

nico00 commented May 10, 2018

What did you do?

I'm trying to use pillow-simd (instead of pillow) with an AWS Lambda function.

What did you expect to happen?

It works, as pillow does

What actually happened?

I'm getting the following error message:

Unable to import module 'app': libjpeg.so.8: cannot open shared object file: No such file or directory

Please note that the standard pillow library (5.1.0) works properly.

What versions of Pillow and Python are you using?

Python 3.6.5
Pillow-SIMD 5.1.1.post0

@nico00 nico00 changed the title libjpeg.so.8 not found when using deployed on AWS Lambda libjpeg.so.8 not found when using with AWS Lambda May 10, 2018
@Globegitter
Copy link

I am running into the same issue wanting to create a distroless and it is not so nice because only debian wheezy still provides this package so I have do download it from the wheezy repositories. It seems that has been replaced by libjpeg.so.62 / https://packages.debian.org/stretch/libjpeg62-turbo. Is there any way of updating this dependency here?

@Globegitter
Copy link

For reference, for me the issue was that pip install happened on an Ubuntu machine and the app was then running on a Debian based docker image, where it seems there are differences in the libjppeg library.

@Globegitter
Copy link

I guess a big difference is that pillow offers wheels, which as far as I understand would include the c dependencies, but python-simd does not offer wheel. @homm do you know if that could fix the issue? And if so would it be possible to provide some wheels with the releases? I would also be happy to build the linux based wheels ourselves and provide them.

@dangelsaurus
Copy link

@Globegitter did you ever find a good solution to this?

@dangelsaurus
Copy link

@Globegitter did you ever find a good solution to this?

Ok I just ended up launching an Amazon Linux instance (since that's what Lambda runs on) and was successful creating the lambda package that way. Runs about 300ms faster! (from 900ms down to about 600 ms)

@amiantos
Copy link

For other people who stumble here, there is an Amazon Linux docker image that can be useful for building packages to be used in Lambda, no need to launch a real instance. An example over here: https://amiantos.net/automated-lambda-deploys/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants