All I'm trying to do is create a flask app for Places365 and deploy it as an AWS Lambda with API. While everything works fine on my EC-2 instance, Lambda keeps failing with
"No module named 'torch': ModuleNotFoundError"
error.
Initially, when I tried to include the torch as part of my virtual environment, Lambda kept failing with "No space left"
error. So, I uninstalled torch from my virtual environment, redeployed the function and added PyTorch layer (arn:aws:lambda:us-east-1:934676248949:layer:pytorchv1-py36:2) to the function. Still, it fails with "No module named 'torch': ModuleNotFoundError"
error
Also, I used Zappa for Lambda deployment
It would be great if someone can share their experience of deploying torch to Lambda