I want to deploy tesseract-OCR on lambda. Scroll to the section where it says adaptions for tesseract 4. I have built tesseract following this tutorial. But I am facing an issue with this as the build is not portable. When ever I try to use the built on a new Linux instance, I have to set the environmental variable PATH to /tmp or else this wont work.
Structure
├── cv2
├── lib
├── numpy
├── PIL
├── pytesseract
├── tessdata
├── tesseract
├── test.png
└── zzz.py
https://s3.amazonaws.com/tesseractstandalone/complete-package.zip
This is the link for the standalone tesseract. There is a sample program zzz.py which has the script for running the tesseract. When I download the zip and extract to /tmp/ folder in an ec2 instance, the program works fine. But I am having an issue when working with lambda. When I try to download the same thing to lambda /tmp/ folder, I am getting an error that says tesseract is not installed or it's not in your path. Don't know where things are going wrong. Not sure whether its a PATH issue or lambda issue.