-
Notifications
You must be signed in to change notification settings - Fork 3
Dependency issues #28
Comments
which layer/docker image are you trying to use @valpesendorfer ? |
Following the example line by line. So the layer is remotepixel/amazonlinux:gdal3.0-py3.7-geo arn:aws:lambda:eu-central-1:524387336408:layer:gdal30-py37-geo:7 |
This is unlucky but lambCI base image provide pyyaml but I think just because of user dependencies. To fix this I'll need to compare what modules are actually in lambda and what are those in lambci/python3.7-build. Temporary fix is to install pyyaml before you try to install your module. FROM remotepixel/amazonlinux:gdal3.0-py3.7-geo
# Basically we don't want to replicated existant modules found in the layer ($PYTHONPATH)
# So we use the $PYTHONUSERBASE trick to set the output directory
ENV PYTHONUSERBASE=/var/task
RUN pip install pyyaml --user --ignore-installed
.... |
Yeah, I was afraid this will be the only option for now. Means I need to dig out all missing dependencies and install them manually. If it’s of any help, I’ve previously printed the elements in
Thanks again! |
the full list of pacakge in AWS Lambda function can be found over https://gist.github.com/gene1wood/4a052f39490fae00e0c3 |
Hi @vincentsarago, thanks for your work on this (and other things I use).
I'm trying to install a module for use alongside the lambda layer, following the steps outlined in the respective README section.
I've ran into some issues with dependencies that are available in the docker image (so no issues during build or package) but they are missing in the actual lambda function.
Here's an specific example:
The module I'm installing (replacing
mercantile
in your example) depends among other things onpyyaml
. When running pip install I get the corresponding log message:and everything works fine locally. But the contents of
/var/lang/lib/python3.7/site-packages
don't make it into the zip, and they are not available in the lambda function which includes the layer.Of course I could just try to find and install all dependencies into
/var/task
so they get zipped up. But that seems to be a sub-optimal solution. Any ideas? Apologies if I'm missing something obvious.Thanks!
The text was updated successfully, but these errors were encountered: