-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathDockerfile-python27-lambda
More file actions
38 lines (30 loc) · 1.4 KB
/
Dockerfile-python27-lambda
File metadata and controls
38 lines (30 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Dockerfile for packaging a Python based RDKit implementation to deploy
# as an AWS Lambda layer. See comments in build-python27-lambda.sh for
# details.
FROM lambci/lambda:build-python2.7
RUN yum install -y --setopt=tsflags=nodocs --setopt=override_install_langs=en_US.utf8\
python27-numpy\
sqlite\
sqlite-devel\
yum clean -y all &&\
rm -rf /var/cache/yum
ARG DOCKER_TAG=latest
COPY artifacts/python27-lambda/$DOCKER_TAG/rpms/RDKit-*-Linux-Runtime.rpm artifacts/python27-lambda/$DOCKER_TAG/rpms/RDKit-*-Linux-Python.rpm artifacts/python27-lambda/$DOCKER_TAG/boost/boost-1.56.0.tgz /tmp/
RUN cd /usr/lib64 && tar xvfz /tmp/boost-1.56.0.tgz && rm /tmp/boost-1.56.0.tgz && ls -l /usr/lib64/*boost*
RUN rpm --nodeps -iv /tmp/*.rpm && rm -f /tmp/*.rpm
# Copy all files for the lambda layer.
# Note this does NOT include the NumPy dependency - instead this should
# be provided by using this layer together with the public AWS SciPy1x layer when
# creating a lambda function.
RUN mkdir -p /tmp/layer/lib && mkdir -p /tmp/layer/python
RUN cp -av /usr/lib64/python2.7/dist-packages/rdkit /tmp/layer/python
RUN cp -av /usr/lib64/libRDKit* /tmp/layer/lib
RUN cp -av /usr/lib64/libboost_* /tmp/layer/lib
RUN cp -av /usr/lib64/libsqlite3* /tmp/layer/lib
# Assemble the lambda layer as a zipfile
WORKDIR /tmp/layer
RUN zip --symlinks -rv rdkit-python27.zip *
WORKDIR /
# add the rdkit user
RUN useradd -u 1000 -U -G 0 rdkit
USER 1000