Skip to content

Deploying services

denny edited this page Dec 20, 2020 · 5 revisions

This app uses a number of external microservices for PDF parsing.

Grobid/Figures

Steps to use this:

  1. Build the docker image docker build -t figures . and tag it: docker image tag figures dluan/figures:0.0.5

  2. Run the image to start the sinatra web host docker run -p 4567:4567 dluan/figures:0.0.5

Or if running on an external instance, forward port 80. e.g.

docker run -t --init --rm -p 80:4567 dluan/figures:0.0.5 for figures

docker run -t --rm --init -p 80:8070 lfoppiano/grobid:0.6.1 for grobid

  1. Once it's running you can post to it like so:
curl localhost:4567/process -X POST -H "Content-Type: application/json" -d '{"pdf": "https://storage.googleapis.com/jellyposter-store/d5058c6990e36d68068ad98422372b6b.pdf", "upload_id": "1"}'

Troubleshooting

Sometimes Grobid may die and end up turning the service into a zombie, in which case you'll need to stop and restart it (e.g. if using GCE), and then restart the docker Grobid image.

Google Compute Engine

You can easily set up an instance there, make sure to use enough RAM (see Grobid guidelines in Docker section). Give it an external IP, and that address will be set in the Jelly environment variable as GROBID_HOST. Be sure to set it to http, and not https.