Skip to content

Commit 09a3d10

Browse files
Merge pull request #51 from developmentseed/develop
release 1.1.0rc2
2 parents 52a9fdf + 122a712 commit 09a3d10

File tree

8 files changed

+37
-40
lines changed

8 files changed

+37
-40
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
66

77
## [Unreleased]
88

9-
## [v1.1.0rc1] - 2018-03-07
9+
## [v1.1.0] - 2018-03-12
1010

1111
### Added
1212
- Make compatible with Lambda Layers
@@ -52,5 +52,5 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
5252
- GDAL_VERSION=2.3.1
5353

5454
[Unreleased]: https://github.com/sat-utils/sat-stac/compare/master...develop
55-
[v1.1.0rc1]: https://github.com/developmentseed/geolambda/compare/1.0.0...1.1.0rc1
55+
[v1.1.0]: https://github.com/developmentseed/geolambda/compare/1.0.0...1.1.0
5656
[v1.0.0]: https://github.com/developmentseed/geolambda/tree/1.0.0

Dockerfile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
FROM lambci/lambda:build-provided
22

3-
LABEL maintainer="Matthew Hanson <matt.a.hanson@gmail.com>"
3+
LABEL maintainer="Development Seed <info@developmentseed.org>"
4+
LABEL authors="Matthew Hanson <matt.a.hanson@gmail.com>"
45

56
# install system libraries
67
RUN \
@@ -12,7 +13,7 @@ RUN \
1213

1314
# versions of packages
1415
ENV \
15-
CURL_VERSION=7.51.0 \
16+
CURL_VERSION=7.59.0 \
1617
GEOS_VERSION=3.7.1 \
1718
GEOTIFF_VERSION=1.4.3 \
1819
GDAL_VERSION=2.4.0 \
@@ -33,7 +34,8 @@ ENV \
3334
NPROC=4 \
3435
PREFIX=/usr/local \
3536
GDAL_CONFIG=/usr/local/bin/gdal-config \
36-
LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64
37+
LD_LIBRARY_PATH=/usr/local/lib \
38+
GDAL_DATA=/usr/local/share/gdal
3739

3840
# switch to a build directory
3941
WORKDIR /build
@@ -180,12 +182,14 @@ RUN \
180182
--with-threads=yes \
181183
--with-curl=${PREFIX}/bin/curl-config \
182184
--without-python \
185+
--without-libtool \
183186
--with-geos=$PREFIX/bin/geos-config \
184187
--with-hide-internal-symbols=yes \
185-
CFLAGS="-O2 -Os" CXXFLAGS="-O2 -Os"; \
188+
CFLAGS="-O2 -Os" CXXFLAGS="-O2 -Os" \
189+
LDFLAGS="-Wl,-rpath,'\$\$ORIGIN'"; \
186190
make -j ${NPROC} install; \
187191
cd ${BUILD}; rm -rf gdal
188-
192+
#
189193
# Copy shell scripts and config files over
190194
COPY bin/* /usr/local/bin/
191195

README.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# GeoLambda: geospatial AWS Lambda Layer
22

3-
Note: this is a pre-release version (v1.1.0rc1) of GeoLambda
4-
53
The GeoLambda project provides public Docker images and AWS Lambda Layers containing common geospatial native libraries. GeoLambda contains the libraries PROJ.5, GEOS, GeoTIFF, HDF4/5, SZIP, NetCDF, OpenJPEG, WEBP, ZSTD, and GDAL. For some applications you may wish to minimize the size of the libraries by excluding unused libraries, or you may wish to add other libraries. In this case this repository can be used as a template to create your own Docker image or Lambda Layer following the instructions in this README.
64

75
This repository also contains examples and pre-built images for specific runtimes.
@@ -15,7 +13,7 @@ While GeoLambda was initially intended for AWS Lambda they are also useful as ba
1513
| geolambda | GDAL |
1614
| -------- | ---- |
1715
| 1.0.0 | 2.3.1 |
18-
| 1.1.0rc1 | 2.4.0 |
16+
| 1.1.0 | 2.4.0 |
1917

2018
To get the version numbers of all installed packages see the [CHANGELOG](CHANGELOG.md) or the Dockerfile for the specific version.
2119

@@ -39,15 +37,15 @@ The GeoLambda image does not have an entrypoint defined, so a command must be pr
3937

4038
### Lambda Layer
4139

42-
If you just wish to use the publicly avialable Lambda layer you will need the ARN for the layer in same region as your Lambda function. Currently, GeoLambda layers are available in `us-east-1`, `us-west-2`, and `eu-central-1`. If you want to use it in another region please file an issue or you can also create your own layer using this repository (see instructions below on 'Create a new version').
40+
If you just wish to use the publicly available Lambda layer you will need the ARN for the layer in same region as your Lambda function. Currently, GeoLambda layers are available in `us-east-1`, `us-west-2`, and `eu-central-1`. If you want to use it in another region please file an issue or you can also create your own layer using this repository (see instructions below on 'Create a new version').
4341

44-
#### v1.1.0rc1
42+
#### v1.1.0rc2
4543

4644
| Region | ARN |
4745
| ------ | --- |
48-
| us-east-1 | arn:aws:lambda:us-east-1:552188055668:layer:geolambda-dev:1 |
49-
| us-west-2 | arn:aws:lambda:us-west-2:552188055668:layer:geolambda-dev:1 |
50-
| eu-central-1 | arn:aws:lambda:eu-central-1:552188055668:layer:geolambda-dev:1 |
46+
| us-east-1 | arn:aws:lambda:us-east-1:552188055668:layer:geolambda-dev:2 |
47+
| us-west-2 | arn:aws:lambda:us-west-2:552188055668:layer:geolambda-dev:2 |
48+
| eu-central-1 | arn:aws:lambda:eu-central-1:552188055668:layer:geolambda-dev:2 |
5149

5250

5351
## Development
@@ -82,8 +80,8 @@ $ docker push developmentseed/geolambda:${VERSION}
8280
4. Create deployment package using the built-in [packaging script](bin/package.sh)
8381

8482
```
85-
$ docker run --rm -v $PWD:/home/geolambda --entrypoint package.sh \
86-
-it developmentseed/geolambda:${VERSION}
83+
$ docker run --rm -v $PWD:/home/geolambda \
84+
-it developmentseed/geolambda:${VERSION} package.sh
8785
```
8886

8987
This will create a lambda/ directory containing the native libraries and related files, along with a `lambda-deploy.zip` file that can be deployed as a Lambda layer.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.0rc1
1+
1.1.0rc2

bin/package.sh

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,8 @@ echo Creating deploy package
88
# make deployment directory and add lambda handler
99
mkdir -p $DEPLOY_DIR/lib
1010

11-
# copy 32-bit libs
12-
cp $PREFIX/lib/libproj.so.13 $DEPLOY_DIR/lib/
13-
cp $PREFIX/lib/libgdal.so.20 $DEPLOY_DIR/lib/
14-
cp $PREFIX/lib/libdf.so.0 $DEPLOY_DIR/lib/
15-
cp $PREFIX/lib/libsz.so.2 $DEPLOY_DIR/lib/
16-
cp $PREFIX/lib/libhdf5.so.103 $DEPLOY_DIR/lib/
17-
cp $PREFIX/lib/libhdf5_hl.so.100 $DEPLOY_DIR/lib/
18-
cp $PREFIX/lib/libmfhdf.so.0 $DEPLOY_DIR/lib/
19-
cp $PREFIX/lib/libgeos_c.so.1 $DEPLOY_DIR/lib/
20-
cp $PREFIX/lib/libgeos-3.7.1.so $DEPLOY_DIR/lib/
21-
cp $PREFIX/lib/libnetcdf.so.13 $DEPLOY_DIR/lib/
22-
cp $PREFIX/lib/libopenjp2.so.7 $DEPLOY_DIR/lib/
23-
cp $PREFIX/lib/libwebp.so.7 $DEPLOY_DIR/lib/
24-
cp $PREFIX/lib/libgeotiff.so.2 $DEPLOY_DIR/lib/
25-
cp $PREFIX/lib/libzstd.so.1 $DEPLOY_DIR/lib/
26-
27-
# copy 64-bit libs
28-
cp /usr/lib64/libjpeg.so.62 $DEPLOY_DIR/lib/
29-
#cp /usr/lib64/libpq.so.5 $DEPLOY_DIR/lib/
11+
# copy libs
12+
cp -P ${PREFIX}/lib/*.so* $DEPLOY_DIR/lib/
3013

3114
strip $DEPLOY_DIR/lib/* || true
3215

python/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
ARG VERSION=latest
22
FROM developmentseed/geolambda:${VERSION}
33

4-
LABEL maintainer="Matthew Hanson <matt.a.hanson@gmail.com>"
4+
LABEL maintainer="Development Seed <info@developmentseed.org>"
5+
LABEL authors="Matthew Hanson <matt.a.hanson@gmail.com>"
56

67
ARG PYVERSION=3.6.1
78

python/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ This image includes the dependencies specified in the default [requirements.txt]
6464

6565
## Development
6666

67-
To create a new official version of a Python GeoLambda Docker image for publication to Docker Hub follow these steps *after* following the [steps for publishing a new base GeoLambda](../README.md)
67+
To create a new official version of a Python GeoLambda Docker image for publication to Docker Hub follow these steps *after* following the [steps for publishing a new base GeoLambda](../README.md). These steps are performed automatically in [CircleCI](../.circleci/config.yml)
6868

6969
From this directory:
7070

7171
```
72-
$ VERSION=${cat ../VERSION}
72+
$ VERSION=$(cat ../VERSION)
7373
$ docker build . --build-arg VERSION=${VERSION} -t developmentseed/geolambda:${VERSION}-python36
7474
```
7575

python/lambda/lambda_function.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
import subprocess
23
import sys
34
import logging
45

@@ -19,6 +20,16 @@ def lambda_handler(event, context=None):
1920
""" Lambda handler """
2021
logger.debug(event)
2122

23+
# this try block is for testing and info only,
24+
# it prints out info on the the libgdal binary and paths to linked libraries
25+
#try:
26+
# output = subprocess.check_output('readelf -d /opt/lib/libgdal.so'.split(' '))
27+
# logger.info(output.decode())
28+
# output = subprocess.check_output('ldd /opt/lib/libgdal.so'.split(' '))
29+
# logger.info(output.decode())
30+
#except Exception as e:
31+
# pass
32+
2233
# process event payload and do something like this
2334
fname = event.get('filename', test_filename)
2435
fname = fname.replace('s3://', '/vsis3/')

0 commit comments

Comments
 (0)