kermitt2 / grobid

A machine learning software for extracting information from scholarly documents
https://grobid.readthedocs.io
Apache License 2.0
3.59k stars 459 forks source link

Can one deploy grobid on AWS lambda? #1157

Open rgranit opened 3 months ago

rgranit commented 3 months ago

Hi,

Does anyone know if it is possible to run this grobid on AWS Lamda? and if so, how much time it takes to load?

Siedlerchr commented 2 months ago

I don't know about AWS lambda, but I guess you could deploy it on fargate/ECS. We have deployed it on Azure container

lfoppiano commented 2 months ago

@rgranit never tried, but I'd be happy to hear if you manage. There are a few other issues opened about it, but I don't remember there was any conclusive information.

vegarab commented 2 months ago

Hi @rgranit

I've experimented with Lambda setups for GROBID. Although it works, the cold-start times are problematic. We've opted to use ECS Fargate directly with the public docker images.

I do think it is possible to get a Lambda runtime working with acceptable cold-starts though. My lack of familiarity with the Java runtimes and environment is keeping me from exploring further, but the Lambda SnapStart [0] (only available for Java) could potentially get you what you want, if you build a custom runtime for it. Simply using the public docker images are not suitable for the Lambda Firecraker VMs

[0] https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html