informagi / REL

REL: Radboud Entity Linker
https://rel.readthedocs.io/
MIT License
304 stars 68 forks source link

Error when using prebuilt docker image #136

Closed flackbash closed 1 year ago

flackbash commented 1 year ago

Hi,

I set up the server on my machine by running the following commands from the README

./scripts/download_data.sh ./data generic wiki_2019
docker pull informagi/rel
docker run \
    -p 5555:5555 \
    -v $PWD/data/:/workspace/data \
    --rm -it informagi/rel \
    python -m REL.server --bind 0.0.0.0 --port 5555 /workspace/data wiki_2019

However, when I try to query the system using the example EL code from the README with my own API URL, I get the following server output:

[28/Nov/2022 09:33:23] "POST /api HTTP/1.1" 200 -
Encountered exception: ValueError('invalid literal for int() with base 2: b\'[["Charles_Bukowski",\'')
[28/Nov/2022 09:33:23] "POST /api HTTP/1.1" 400 -

Here is my client code for reproducibility:

import requests

API_URL = "http://myhostname:5555/"
text_doc = "If you're going to try, go all the way - Charles Bukowski"

# Example EL.
el_result = requests.post(API_URL, json={
    "text": text_doc,
    "spans": []
}).json()
print(el_result)

If I build the docker image myself instead of pulling it from informagi/rel, the error does not occur.

arjenpdevries commented 1 year ago

@kdercksen / @mickvanhulst is the docker image at docker hub up to date?

KDercksen commented 1 year ago

No! Apparently Dockerhub switched to only allowing automated builds with a paid account, I wasn't aware of this. @stefsmeets could we add a workflow for publishing to Dockerhub (or Github packages or something else) automatically on new main commits?

I will update the image on Dockerhub manually for now.

stefsmeets commented 1 year ago

We could use the Github container registry. I'd be happy to have a look at this.

KDercksen commented 1 year ago

Great :D in the meantime, the Dockerhub image is now updated.

flackbash commented 1 year ago

Great, thank you for looking into this :)

stefsmeets commented 1 year ago

Automated builds and upload to dockerhub seems to work now:

I made it so that the action syncs with github releases. This helps with versioning and preserves some compute resources. You can also trigger the action manually here.