COVID-19 icon indicating copy to clipboard operation
COVID-19 copied to clipboard

Reduce PyTorch project bundle size to be able to deploy to Lambda

Open franciscohanna92 opened this issue 4 years ago • 4 comments

The project is too heavy to run on AWS Lambda. It throws the following error when trying to deploy:

STDERR: ERROR: Could not install packages due to an EnvironmentError: [Errno 28] No space left on device

Torch is the heaviest dependency. Almost 800MB.

franciscohanna92 avatar Mar 22 '20 01:03 franciscohanna92

AWS have a service: https://aws.amazon.com/es/pytorch/ locally we could use the PyTorch Docker image. In production the AWS service...

nietzscheson avatar Mar 22 '20 05:03 nietzscheson

Hmm we could have sage maker for that but it's a bit expensive. We will use it just if it's the last option.

elcronos avatar Mar 22 '20 05:03 elcronos

What about dockerizing the model and deploying it using AWS ECS?

ajhenaor avatar Mar 22 '20 14:03 ajhenaor

Lamdbas will last until we reach a high traffic (it will become expensive). We should consider basing the architecture on AWS ECS, so it can help to handle cost.

aenriquerg avatar Mar 22 '20 15:03 aenriquerg