File tree Expand file tree Collapse file tree 3 files changed +32
-6
lines changed Expand file tree Collapse file tree 3 files changed +32
-6
lines changed Original file line number Diff line number Diff line change 42
42
docker push developmentseed/geolambda:latest
43
43
docker push developmentseed/geolambda:${VERSION}
44
44
cd python
45
- docker build --build-arg VERSION=${VERSION} --build-arg PYVER =3.6.1 . -t developmentseed/geolambda:${VERSION}-python36
45
+ docker build --build-arg VERSION=${VERSION} --build-arg PYVERSION =3.6.1 . -t developmentseed/geolambda:${VERSION}-python36
46
46
docker push developmentseed/geolambda:${VERSION}-python36
47
47
cd ..
48
48
# deploy public Lambda layers
Original file line number Diff line number Diff line change @@ -3,22 +3,26 @@ FROM developmentseed/geolambda:${VERSION}
3
3
4
4
LABEL maintainer="Matthew Hanson <matt.a.hanson@gmail.com>"
5
5
6
- ARG PYVER =3.6.1
6
+ ARG PYVERSION =3.6.1
7
7
8
8
# install Python
9
9
ENV \
10
10
PYENV_ROOT=/root/.pyenv \
11
11
PATH=/root/.pyenv/shims:/root/.pyenv/bin:$PATH
12
12
13
13
RUN \
14
+ PYMINVER=${PYVER} \
15
+ export PYVER=${PYVER%%.*}${PYMINVER#*.} \
14
16
echo PYVER ${PYVER}; \
15
17
curl https://pyenv.run | bash; \
16
- pyenv install ${PYVER }; \
17
- pyenv global ${PYVER }; \
18
+ pyenv install ${PYVERSION }; \
19
+ pyenv global ${PYVERSION }; \
18
20
pip install --upgrade pip
19
21
20
22
COPY requirements*.txt ./
21
23
22
24
RUN \
23
- pip isntall -r requirements-pre.txt; \
24
- pip install -r requirements.txt
25
+ pip install -r requirements-pre.txt; \
26
+ pip install -r requirements.txt
27
+
28
+ COPY bin/* /usr/local/bin/
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # directory used for deployment
4
+ export DEPLOY_DIR=lambda
5
+
6
+ echo Creating deploy package
7
+
8
+ EXCLUDE=" boto3* botocore* pip* docutils* *.pyc setuptools* wheel* coverage* testfixtures* mock* *.egg-info *.dist-info"
9
+
10
+ EXCLUDES=()
11
+ for E in ${EXCLUDE}
12
+ do
13
+ echo ${E}
14
+ EXCLUDES+=(" --exclude ${E} " )
15
+ done
16
+
17
+ rsync -ax $PREFIX /lib/python$PYVER /site-packages/ $DEPLOY_DIR / ${EXCLUDES[@]}
18
+ rsync -ax $PREFIX /lib64/python$PYVER /site-packages/ $DEPLOY_DIR / ${EXCLUDES[@]}
19
+
20
+ # zip up deploy package
21
+ cd $DEPLOY_DIR
22
+ zip -ruq ../lambda-deploy.zip ./
You can’t perform that action at this time.
0 commit comments