Skip to content

Commit be1ddc4

Browse files
author
Ubuntu
committed
2 parents 0dcf54d + acf0b73 commit be1ddc4

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

crispdm6-pred_lambda/part1_instructions.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,27 @@ python ~/lambda/lambda_function.py
4444
## Create Deployment Packages
4545
1. Move packages into the same directory as your script, such as:
4646
```
47-
cp -r ~/mxnet/lib/python2.7/site-packages/* ~/lambda/
48-
cp -r ~/mxnet/lib64/python2.7/site-packages/* ~/lambda/
47+
cd ~/lambda/
48+
cp -r ~/mxnet/lib/python2.7/site-packages/* .
49+
cp -r ~/mxnet/lib64/python2.7/site-packages/* .
4950
```
50-
2. Zip up all files into the Deployment Package
51+
2. Copy in needed libraries (taken from https://ryan-cranfill.github.io/keras-aws-lambda/)
52+
```
53+
find /usr/lib64 -name "libblas.*" -exec cp -P {} lib/ \;
54+
find /usr/lib64 -name "libgfortran.*" -exec cp -P {} lib/ \;
55+
find /usr/lib64 -name "liblapack.*" -exec cp -P {} lib/ \;
56+
find /usr/lib64 -name "libopenblas.*" -exec cp -P {} lib/ \;
57+
find /usr/lib64 -name "libquadmath.*" -exec cp -P {} lib/ \;
58+
find /usr/lib64 -name "libf77blas.*" -exec cp -P {} lib/ \;
59+
find /usr/lib64 -name "libcblas.*" -exec cp -P {} lib/ \;
60+
find /usr/lib64 -name "libatlas.*" -exec cp -P {} lib/ \;
61+
```
62+
3. Zip up all files into the Deployment Package
5163
```
5264
cd ~/lambda
5365
zip -r -9 --exclude="*.pyc" ../lambda.zip ./*
5466
```
55-
3. Upload Deployment Package onto S3
67+
4. Upload Deployment Package onto S3
5668
```
5769
aws s3 cp ../lambda.zip s3://jakechenawstemp/
5870
```
@@ -73,4 +85,4 @@ aws s3 cp ../lambda.zip s3://jakechenawstemp/
7385
--role [LAMBDA ROLE ARN] \ # change this to the role you made
7486
--handler lambda_function.lambda_handler \
7587
--runtime python2.7
76-
```
88+
```

0 commit comments

Comments
 (0)