Package libraries with native dependencies #98
Comments
|
I ran into the same problem today and fell back to using a docker container for building the function package. Something along the lines of the following Dockerfile would do the job (e.g. for Ubuntu 16.04): FROM ubuntu:xenial
ENV LANG C.UTF-8
RUN apt-get update --fix-missing
RUN apt-get install -y python curl git
RUN apt-get upgrade -y
RUN curl https://bootstrap.pypa.io/get-pip.py | python2
RUN pip install python-lambda
WORKDIR /build
COPY . /build/
# run your build command
CMD lambda build --requirements requirements.txt
docker build -t mylambdacontainer .
docker run -v $(pwd)/dist:/build/dist mylambdacontainerI mount the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am developing on macOS and want to package Pillow. I have installed and downloaded pillow from an ec2 instance and want it to be packaged instead of the one in site-packages. Right now only way to do is to include PIL in source_directories and uninstall it via pip before packaging.
Is there a better way to do it?
The text was updated successfully, but these errors were encountered: