File tree Expand file tree Collapse file tree 3 files changed +14
-7
lines changed Expand file tree Collapse file tree 3 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
# directory used for deployment
4
- DEPLOY_DIR=lambda
4
+ export DEPLOY_DIR=lambda
5
+ export PYVER=${1:- 2.7}
5
6
6
- PYVER=${1:- 2.7}
7
-
8
- echo PYVER: $PYVER
7
+ echo Creating deploy package for Python $PYVER
9
8
10
9
# make deployment directory and add lambda handler
11
10
mkdir -p $DEPLOY_DIR /lib/python$PYVER /site-packages
@@ -22,15 +21,20 @@ cp $PREFIX/lib/libgeos_c.so.1 $DEPLOY_DIR/lib/
22
21
cp $PREFIX /lib/libgeos-3.6.2.so $DEPLOY_DIR /lib/
23
22
cp $PREFIX /lib/libnetcdf.so.13 $DEPLOY_DIR /lib/
24
23
cp $PREFIX /lib/libopenjp2.so.7 $DEPLOY_DIR /lib/
25
- rsync -ax $PREFIX /lib/python$PYVER /site-packages/ $DEPLOY_DIR /lib/python $PYVER /site-packages/ \
24
+ rsync -ax $PREFIX /lib/python$PYVER /site-packages/ $DEPLOY_DIR / \
26
25
--exclude-from $PREFIX /etc/lambda-excluded-packages
27
26
28
27
# copy 64-bit libs
29
28
cp /usr/lib64/libjpeg.so.62 $DEPLOY_DIR /lib/
30
29
# cp /usr/lib64/libpq.so.5 $DEPLOY_DIR/lib/
31
- rsync -ax $PREFIX /lib64/python$PYVER /site-packages/ $DEPLOY_DIR /lib/python$PYVER /site-packages/ \
30
+ # rsync -ax $PREFIX/lib64/python$PYVER/site-packages/ $DEPLOY_DIR/lib/python$PYVER/site-packages/ \
31
+ rsync -ax $PREFIX /lib64/python$PYVER /site-packages/ $DEPLOY_DIR / \
32
32
--exclude-from $PREFIX /etc/lambda-excluded-packages
33
33
34
+ # copy GDAL_DATA files over
35
+ mkdir -p $DEPLOY_DIR /share
36
+ rsync -ax $PREFIX /share/gdal share/
37
+
34
38
# zip up deploy package
35
39
cd $DEPLOY_DIR
36
40
zip -ruq ../lambda-deploy.zip ./
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ setuptools*
7
7
wheel*
8
8
coverage*
9
9
testfixtures*
10
- pytest*
11
10
mock*
12
11
GDAL-*
12
+ *.egg-info
13
+ *.dist-info
Original file line number Diff line number Diff line change @@ -8,4 +8,6 @@ FROM developmentseed/geolambda:latest
8
8
# pip install . -v; \
9
9
# rm -rf /build/*;
10
10
11
+ COPY lambda/lambda-package.sh /usr/local/bin/
12
+
11
13
WORKDIR /home/geolambda
You can’t perform that action at this time.
0 commit comments