Created
February 15, 2019 12:53
-
-
Save alexeygrigorev/f355c69b9dbd98f056eda86f39e7e48e to your computer and use it in GitHub Desktop.
Build libwebp for aws lambda
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM amazonlinux:2017.03 | |
RUN yum -y install git \ | |
python36 \ | |
python36-pip \ | |
python36-devel \ | |
zip \ | |
gcc \ | |
gcc-c++ \ | |
cmake \ | |
&& yum clean all | |
RUN python3 -m pip install --upgrade pip cffi \ | |
&& python3 -m pip install boto3 | |
RUN python3 -m pip install conan | |
RUN conan install libwebp/1.0.0@bincrafters/stable --build libwebp | |
WORKDIR /app | |
COPY code/requirements.txt . | |
RUN python3 -m pip install -r requirements.txt -t build | |
WORKDIR /app/build | |
COPY code/index.py . | |
RUN find . -name "__pycache__" | xargs -n1 rm -rf | |
RUN zip -r ../packed.zip * | |
WORKDIR /app | |
ENTRYPOINT [ "cp", "packed.zip", "results/s3-index.zip" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment