elcronos / COVID-19

COVID-19 Detector from x-rays using Computer Vision and Deep Learning
314 stars 68 forks source link

Create AWS Lambda Layer with PyTorch #41

Open nietzscheson opened 4 years ago

nietzscheson commented 4 years ago

AWS Lambda have restrictions. PyTorch is too longer. When trying to deploy the project, AWS Lambda reports the out of memory error. PyTorch weighs: 758MB.

There is PyTorch layers with other versions. It could be a problem. We need to control the versions of the dependencies that we are going to use.

An alternative is:

Related: #18, #20, #29, #30

jisazaTappsi commented 4 years ago

We can start prototyping with this layer that its publicly available:

arn:aws:lambda:AWS_REGION:934676248949:layer:pytorchv1-py36:2

caveat: its version 1.1 of pytorch while we are using 1.4

I already checked the layer and its working!

and following this tutorial:

https://course.fast.ai/deployment_aws_lambda.html