Skip to content

Commit 339e998

Browse files
Merge pull request #73 from developmentseed/develop
release 1.2.0rc1
2 parents 0bd2b03 + 8293b7a commit 339e998

File tree

11 files changed

+175
-82
lines changed

11 files changed

+175
-82
lines changed

.circleci/config.yml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,35 +29,46 @@ jobs:
2929
- run:
3030
name: Build application Docker image
3131
command: |
32-
VERSION=$(cat VERSION)
33-
docker build . -t developmentseed/geolambda:${VERSION}
34-
# publish docker images
32+
# update known hosts
3533
mkdir -p ~/.ssh
3634
ssh-keyscan github.com >> ~/.ssh/known_hosts
37-
#git tag -d ${VERSION}
35+
# build and publish geolambda
36+
VERSION=$(cat VERSION)
37+
docker build . -t developmentseed/geolambda:${VERSION}
38+
docker run --rm -v ${PWD}:/home/geolambda --entrypoint package.sh -it developmentseed/geolambda:${VERSION}
3839
git tag ${VERSION}
3940
git push origin ${VERSION}
4041
docker login -u $DOCKER_USER -p $DOCKER_PASS
4142
docker tag developmentseed/geolambda:${VERSION} developmentseed/geolambda:latest
4243
docker push developmentseed/geolambda:latest
4344
docker push developmentseed/geolambda:${VERSION}
45+
# build and publish geolambda-python docker image
4446
cd python
45-
docker build --build-arg VERSION=${VERSION} --build-arg PYVERSION=3.6.1 . -t developmentseed/geolambda:${VERSION}-python36
46-
docker push developmentseed/geolambda:${VERSION}-python36
47+
docker build --build-arg VERSION=${VERSION} . -t developmentseed/geolambda:${VERSION}-python
48+
docker run --rm -v ${PWD}:/home/geolambda --entrypoint package-python.sh -it developmentseed/geolambda:${VERSION}-python
49+
docker push developmentseed/geolambda:${VERSION}-python
4750
cd ..
4851
# deploy public Lambda layers
4952
pip install awscli
50-
docker run --rm -v $PWD:/home/geolambda --entrypoint package.sh -it developmentseed/geolambda:${VERSION}
5153
for region in us-east-1 us-west-2 eu-central-1
5254
do
5355
LVERSION="$(aws lambda publish-layer-version --region ${region} \
54-
--layer-name geolambda --license-info 'MIT' \
56+
--layer-name geolambda-dev --license-info 'MIT' \
5557
--description 'Native geospatial libaries for all runtimes' \
5658
--zip-file fileb://lambda-deploy.zip | jq '.Version')"
5759
aws lambda add-layer-version-permission --region ${region} \
58-
--layer-name geolambda --action lambda:GetLayerVersion \
60+
--layer-name geolambda-dev --action lambda:GetLayerVersion \
61+
--statement-id public --version-number ${LVERSION} --principal '*'
62+
LVERSION="$(aws lambda publish-layer-version --region ${region} \
63+
--layer-name geolambda-dev-python --license-info 'MIT' \
64+
--description 'Geospatial Python libraries' \
65+
--zip-file fileb://lambda-deploy.zip | jq '.Version')
66+
--compatible-runtimes python3.7"
67+
aws lambda add-layer-version-permission --region ${region} \
68+
--layer-name geolambda-dev-python --action lambda:GetLayerVersion \
5969
--statement-id public --version-number ${LVERSION} --principal '*'
6070
done
71+
# deploy Python Lambda layers
6172
6273
6374
workflows:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
.env
22
lambda-deploy.zip
3+
lambda-layer-deploy.zip
4+
.DS_Store

CHANGELOG.md

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

77
## [Unreleased]
88

9+
## [v1.2.0] - 2019-10-21
10+
11+
### Added
12+
- A Python GeoLambda Layer is now published, along with the base Lambda Layer. The base layer *must* be included in any Lambda that uses the Python GeoLambda layer. It includes the Python libraries GDAL, rasterio, pyproj, and shapely.
13+
14+
### Changed
15+
- The python diectory, and the new Lambda layer, now uses Python 3.7.4
16+
17+
### Package versions
18+
- GDAL_VERSION=2.4.2
19+
- PROJ_VERSION=5.2.0
20+
- GEOS_VERSION=3.8.0
21+
- GEOTIFF_VERSION=1.4.3
22+
- HDF4_VERSION=4.2.14
23+
- HDF5_VERSION=1.10.5
24+
- NETCDF_VERSION=4.7.1
25+
- NGHTTP2_VERSION=1.39.2
26+
- OPENJPEG_VERSION=2.3.1
27+
- CURL_VERSION=7.66.0
28+
- LIBJPEG_TURBO_VERSION=2.0.3
29+
- PKGCONFIG_VERSION=0.29.2
30+
- SZIP_VERSION=2.1.1
31+
- WEBP_VERSION=1.0.3
32+
- ZSTD_VERSION=1.4.3
33+
934
## [v1.1.0] - 2018-03-22
1035

1136
### Added
@@ -22,27 +47,27 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2247
### Removed
2348
- Removed Python codes to make geolambda system libraries only
2449

25-
### Versions:
26-
- CURL_VERSION=7.59.0
50+
### Package versions:
51+
- GDAL_VERSION=2.4.1
52+
- PROJ_VERSION=5.2.0
2753
- GEOS_VERSION=3.7.1
2854
- GEOTIFF_VERSION=1.4.3
29-
- GDAL_VERSION=2.4.1
55+
- OPENJPEG_VERSION=2.3.0
56+
- LIBJPEG_TURBO_VERSION=2.0.1
3057
- HDF4_VERSION=4.2.14
3158
- HDF5_VERSION=1.10.5
3259
- NETCDF_VERSION=4.6.2
60+
- CURL_VERSION=7.59.0
3361
- NGHTTP2_VERSION=1.35.1
34-
- OPENJPEG_VERSION=2.3.0
35-
- LIBJPEG_TURBO_VERSION=2.0.1
3662
- PKGCONFIG_VERSION=0.29.2
37-
- PROJ_VERSION=5.2.0
3863
- SZIP_VERSION=2.1.1
3964
- WEBP_VERSION=1.0.1
4065
- ZSTD_VERSION=1.3.8
4166

4267
## [v1.0.0] - 2018-07-27
4368

4469
#### Versions:
45-
- PROJ_VERSION=5.1.0
70+
- PROJ_VERSION=5.2.0
4671
- GEOS_VERSION=3.6.2
4772
- HDF4_VERSION=4.2.12
4873
- SZIP_VERSION=2.1.1

Dockerfile

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,29 @@ RUN \
1313

1414
# versions of packages
1515
ENV \
16-
CURL_VERSION=7.59.0 \
17-
GEOS_VERSION=3.7.1 \
16+
GDAL_VERSION=2.4.2 \
17+
PROJ_VERSION=5.2.0 \
18+
GEOS_VERSION=3.8.0 \
1819
GEOTIFF_VERSION=1.4.3 \
19-
GDAL_VERSION=2.4.1 \
2020
HDF4_VERSION=4.2.14 \
21-
HDF5_VERSION=1.10.5 \
22-
NETCDF_VERSION=4.6.2 \
23-
NGHTTP2_VERSION=1.35.1 \
24-
OPENJPEG_VERSION=2.3.0 \
25-
LIBJPEG_TURBO_VERSION=2.0.1 \
21+
HDF5_VERSION=1.10.5 \
22+
NETCDF_VERSION=4.7.1 \
23+
NGHTTP2_VERSION=1.39.2 \
24+
OPENJPEG_VERSION=2.3.1 \
25+
CURL_VERSION=7.66.0 \
26+
LIBJPEG_TURBO_VERSION=2.0.3 \
2627
PKGCONFIG_VERSION=0.29.2 \
27-
PROJ_VERSION=5.2.0 \
2828
SZIP_VERSION=2.1.1 \
29-
WEBP_VERSION=1.0.1 \
30-
ZSTD_VERSION=1.3.8
29+
WEBP_VERSION=1.0.3 \
30+
ZSTD_VERSION=1.4.3
3131

3232
# Paths to things
3333
ENV \
34-
BUILD=/build \
34+
BUILD=/build \
3535
NPROC=4 \
36-
PREFIX=/usr/local \
37-
GDAL_CONFIG=/usr/local/bin/gdal-config \
38-
LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 \
36+
PREFIX=/usr/local \
37+
GDAL_CONFIG=/usr/local/bin/gdal-config \
38+
LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64 \
3939
GDAL_DATA=/usr/local/share/gdal
4040

4141
# switch to a build directory
@@ -79,11 +79,11 @@ RUN \
7979
# GEOS
8080
RUN \
8181
mkdir geos; \
82-
wget -qO- http://download.osgeo.org/geos/geos-$GEOS_VERSION.tar.bz2 \
82+
wget -qO- http://download.osgeo.org/geos/geos-$GEOS_VERSION.tar.bz2 \
8383
| tar xvj -C geos --strip-components=1; cd geos; \
84-
./configure --enable-python --prefix=$PREFIX CFLAGS="-O2 -Os"; \
85-
make -j ${NPROC} install; \
86-
cd ..; rm -rf geos
84+
./configure --enable-python --prefix=$PREFIX CFLAGS="-O2 -Os"; \
85+
make -j ${NPROC} install; \
86+
cd ..; rm -rf geos
8787

8888
# szip (for hdf)
8989
RUN \
@@ -191,16 +191,26 @@ RUN \
191191
--with-zstd=${PREFIX} \
192192
--with-jpeg=${PREFIX} \
193193
--with-threads=yes \
194-
--with-curl=${PREFIX}/bin/curl-config \
194+
--with-curl=${PREFIX}/bin/curl-config \
195195
--without-python \
196196
--without-libtool \
197197
--with-geos=$PREFIX/bin/geos-config \
198-
--with-hide-internal-symbols=yes \
198+
--with-hide-internal-symbols=yes \
199199
CFLAGS="-O2 -Os" CXXFLAGS="-O2 -Os" \
200200
LDFLAGS="-Wl,-rpath,'\$\$ORIGIN'"; \
201201
make -j ${NPROC} install; \
202202
cd ${BUILD}; rm -rf gdal
203-
#
203+
204+
# Open SSL is needed for building Python so it's included here for ease
205+
RUN \
206+
OPENSSL_VERSION=1.0.2; \
207+
mkdir openssl; \
208+
wget -qO- https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \
209+
| tar xvz -C openssl --strip-components=1; cd openssl; \
210+
./config shared --prefix=${PREFIX}/openssl --openssldir=${PREFIX}/openssl; \
211+
make depend; make install; cd ..; rm -rf openssl
212+
213+
204214
# Copy shell scripts and config files over
205215
COPY bin/* /usr/local/bin/
206216

README.md

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ This repository also contains examples and pre-built images for specific runtime
1111
While GeoLambda was initially intended for AWS Lambda they are also useful as base geospatial Docker images. The version of GDAL included for different versions of GeoLambda is shown here:
1212

1313
| geolambda | GDAL |
14-
| -------- | ---- |
15-
| 1.0.0 | 2.3.1 |
16-
| 1.1.0 | 2.4.1 |
14+
| --------- | ---- |
15+
| 1.0.0 | 2.3.1 |
16+
| 1.1.0 | 2.4.1 |
17+
| 1.2.0 | 2.4.2 |
1718

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

@@ -39,21 +40,29 @@ The GeoLambda image does not have an entrypoint defined, so a command must be pr
3940

4041
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').
4142

42-
#### v1.1.0
43+
#### v1.2.0rc1
4344

4445
| Region | ARN |
4546
| ------ | --- |
46-
| us-east-1 | arn:aws:lambda:us-east-1:552188055668:layer:geolambda:1 |
47-
| us-west-2 | arn:aws:lambda:us-west-2:552188055668:layer:geolambda:1 |
48-
| eu-central-1 | arn:aws:lambda:eu-central-1:552188055668:layer:geolambda:1 |
47+
| us-east-1 | arn:aws:lambda:us-east-1:552188055668:layer:geolambda-dev:5 |
48+
| us-west-2 | arn:aws:lambda:us-west-2:552188055668:layer:geolambda-dev:5 |
49+
| eu-central-1 | arn:aws:lambda:eu-central-1:552188055668:layer:geolambda-dev:5 |
50+
51+
#### v1.2.0rc1-python
52+
53+
| Region | ARN |
54+
| ------ | --- |
55+
| us-east-1 | arn:aws:lambda:us-east-1:552188055668:layer:geolambda-dev-python:1 |
56+
| us-west-2 | arn:aws:lambda:us-west-2:552188055668:layer:geolambda-dev-python:1 |
57+
| eu-central-1 | arn:aws:lambda:eu-central-1:552188055668:layer:geolambda-dev-python:1 |
4958

50-
#### v1.1.0rc3
59+
#### v1.1.0
5160

5261
| Region | ARN |
5362
| ------ | --- |
54-
| us-east-1 | arn:aws:lambda:us-east-1:552188055668:layer:geolambda-dev:3 |
55-
| us-west-2 | arn:aws:lambda:us-west-2:552188055668:layer:geolambda-dev:3 |
56-
| eu-central-1 | arn:aws:lambda:eu-central-1:552188055668:layer:geolambda-dev:3 |
63+
| us-east-1 | arn:aws:lambda:us-east-1:552188055668:layer:geolambda:1 |
64+
| us-west-2 | arn:aws:lambda:us-west-2:552188055668:layer:geolambda:1 |
65+
| eu-central-1 | arn:aws:lambda:eu-central-1:552188055668:layer:geolambda:1 |
5766

5867

5968
## Development

VERSION

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

python/Dockerfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
ARG VERSION=latest
1+
ARG VERSION=1.2.0
22
FROM developmentseed/geolambda:${VERSION}
33

44
LABEL maintainer="Development Seed <info@developmentseed.org>"
55
LABEL authors="Matthew Hanson <matt.a.hanson@gmail.com>"
66

7-
ARG PYVERSION=3.6.1
7+
ARG PYVERSION=3.7.4
88

99
# install Python
1010
ENV \
@@ -13,7 +13,9 @@ ENV \
1313

1414
RUN \
1515
curl https://pyenv.run | bash; \
16-
pyenv install ${PYVERSION}; \
16+
CONFIGURE_OPTS="--with-openssl=${PREFIX}/openssl" \
17+
LD_RUN_PATH="${PREFIX}/openssl/lib" \
18+
pyenv install ${PYVERSION}; \
1719
pyenv global ${PYVERSION}; \
1820
pip install --upgrade pip
1921

@@ -23,4 +25,4 @@ RUN \
2325
pip install -r requirements-pre.txt; \
2426
pip install -r requirements.txt
2527

26-
COPY bin/* /usr/local/bin/
28+
COPY bin/* /usr/local/bin/

0 commit comments

Comments
 (0)