Curl error 52: Empty reply from server when trying to annotate with dbpedia spotlight docker

Hello,

I am not being able to get a proper reply from a dbpedia/spotlight docker image. I remember using the :databus tag a year or so ago and it was working on a UNIX environment, but now:

  1. sudo docker pull dbpedia/spotlight-english:databus yields
    Error response from daemon: pull access denied for dbpedia/spotlight-english, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
    Which makes me use the :latest tag and

  2. I’m on a OSX environment now (not sure if that changes anything).

So I am trying to run:

Lucas@MacBook-Pro in Lux -$>sudo docker run -itd --restart unless-stopped -p 0.0.0.0:2222:80 dbpedia/spotlight-english spotlight.sh
a4a1b05d51aba464b5030f130b1c49b8b2502f7fe8fc6cbdaff90bb77aae5418

Which starts the image:

Lucas@MacBook-Pro in Lux -$>docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a4a1b05d51ab dbpedia/spotlight-english “spotlight.sh” 18 seconds ago Up 16 seconds 0.0.0.0:2222->80/tcp confident_aryabhata

But doesn’t reply to curl requests to annotate:

Lucas@MacBook-Pro in Lux -$>curl http://0.0.0.0:2222/rest/annotate --data-urlencode “text=President Obama called Wednesday on Congress to extend a tax break for students included in last year’s economic stimulus package, arguing that the policy provides more generous assistance.” --data “confidence=0.35” -H “Accept: text/turtle”
curl: (52) Empty reply from server

Any help here? Do I need to use the :databus tag? If so, where I can find it? The only tag available on dockerhub is :latest.

Thanks for your time and attention,
Lucas.

@lucas0 we phased out the docker hub entries with spotlight-LANG, because they were too many of them to maintain. Please have a look at: Docker Hub
There you can configure one or more languages.
Please tell us if this worked well for you. – Sebastian

1 Like

@kurzum First of all, thanks for the reply!

I had seen the instructions but I had difficulties installing the docker, especially with the build command:

docker build -t dbpedia/dbpedia-spotlight
"docker build" requires exactly 1 argument.

I assume (is that correct?) I have to download the model (in my case the english) but what would be the syntax to build it? Is the image file required to docker build in the compressed file(spotlight-model_lang=en.tar.gz) somewhere? I couldn’t find it. Would you be able to be more specific on how to build/run the docker.

Thanks for your time and attention,
Lucas.

@lucas0 hm, Docker Hub gives two sets of instructions, but neither one of them seems to work.

@JulioNoe Could you improve the docu?

kurzum@bases:/tmp/docker$  docker volume create spotlight-models
spotlight-models
kurzum@bases:/tmp/docker$  cd multilingual-databus
bash: cd: multilingual-databus: No such file or directory
kurzum@bases:/tmp/docker$  docker build -t dbpedia/dbpedia-spotlight
"docker build" requires exactly 1 argument.
See 'docker build --help'.

Usage:  docker build [OPTIONS] PATH | URL | -

Build an image from a Dockerfile

I was under the impression that docker hub could simplify deployment even more.

That is precisely what I am facing at the moment. I have downloaded the selected model from https://databus.dbpedia.org/dbpedia/spotlight/spotlight-model/ but there is no dockerfile within the tar.gz so I am not sure how to proceed from there.

The cd probably just needs a mkdir beforehand. The main issue is the build.

Thanks once more for the quick answer.

Hi @lucas0 ,

Thanks for the feedback about the documentation, I will update it. For the moment, you need to run the following command:

docker run -tid \
--restart unless-stopped \
 --name dbpedia-spotlight.[LANG] \
 --mount source=spotlight-models,target=/opt/spotlight \
 -p 2222:80 \
 dbpedia/dbpedia-spotlight \
 spotlight.sh [LANG] 

Where [LANG] must be changed for the two-digit code of the language (en for English, es for Spanish, etc.). For example, for English:

docker run -tid \
--restart unless-stopped \
 --name dbpedia-spotlight.en \
 --mount source=spotlight-models,target=/opt/spotlight \
 -p 2222:80 \
 dbpedia/dbpedia-spotlight \
 spotlight.sh en

After downloading the image and running spotlight you can test it with the following command:

curl http://localhost:2222/rest/annotate \
--data-urlencode "text=President Obama called Wednesday on Congress to extend a tax break for students included in last year's economic stimulus package, arguing that the policy provides more generous assistance." \
--data "confidence=0.35" \
-H "Accept: text/turtle"

Thanks again for the feedback, I hope these instructions help. If any problem happens please let me know.

@JulioNoe @kurzum

I am still getting the same error:

curl http://localhost:2222/rest/annotate --data-urlencode "text=President Obama called Wednesday on Congress to extend a tax break for students included in last year's economic stimulus package, arguing that the policy provides more generous assistance." --data "confidence=0.35" -H "Accept: text/turtle"
curl: (52) Empty reply from server

any ideas on why this could be happening?

Hi @lucas0

I tried the following (I took it from the beginning of the post)

Lucas@MacBook-Pro in Lux -$>sudo docker run -itd --restart unless-stopped -p 0.0.0.0:2222:80 dbpedia/spotlight-english spotlight.sh
a4a1b05d51aba464b5030f130b1c49b8b2502f7fe8fc6cbdaff90bb77aae5418

I got the following

jhernandez@DESKTOP-6LIFDE8:~$ sudo docker run -itd --restart unless-stopped -p 0.0.0.0:2222:80 dbpedia/spotlight-english spotlight.sh
Unable to find image 'dbpedia/spotlight-english:latest' locally
docker: Error response from daemon: pull access denied for dbpedia/spotlight-english, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
jhernandez@DESKTOP-6LIFDE8:~$

In your post, you mentioned that you could be able to start the spotlight image

a4a1b05d51aba464b5030f130b1c49b8b2502f7fe8fc6cbdaff90bb77aae5418

Then, I imagine that you have an old spotlight image in your docker. To try something different, maybe you could start with another port, for example 2224

docker run -tid \
--restart unless-stopped \
 --name dbpedia-spotlight.es \
 --mount source=spotlight-models,target=/opt/spotlight \
 -p 2224:80 \
 dbpedia/dbpedia-spotlight \
 spotlight.sh es

I am exemplifying this with the Spanish language because it is a “small” language model. After that, you can try the following request

curl http://localhost:2224/rest/annotate \
--data-urlencode "text=President Obama called Wednesday on Congress to extend a tax break for students included in last year's economic stimulus package, arguing that the policy provides more generous assistance." \
--data "confidence=0.35" \
-H "Accept: text/turtle"

Please let me know if this works for you, thanks again.

UPDATE:

I ran the following command (command and output):

jhernandez@DESKTOP-6LIFDE8:~$ docker run -tid --restart unless-stopped  --name dbpedia-spotlight.es  --mount source=spotlight-model,target=/opt/spotlight  -p 2224:80  dbpedia/dbpedia-spotlight  spotlight.sh es
Unable to find image 'dbpedia/dbpedia-spotlight:latest' locally
latest: Pulling from dbpedia/dbpedia-spotlight
e7c96db7181b: Pull complete
f910a506b6cb: Pull complete
b6abafe80f63: Pull complete
54cd1b8a02b8: Pull complete
8e0905f6c0f0: Pull complete
cc062f7b308d: Pull complete
45efe250a884: Pull complete
Digest: sha256:89cd13d0ea29b7a0869ead2553d652219552b2d6bb2e85780ed6d9fb3ed42a0b
Status: Downloaded newer image for dbpedia/dbpedia-spotlight:latest
d8696cfccf17b36a967e5349953afa44d623d07390f42a58e7bc1491dd67fd85

Just to be sure if the language model was downloaded (or is downloading) I used the docker logs command

jhernandez@DESKTOP-6LIFDE8:~$ docker logs dbpedia-spotlight.es
Selected language: es
/opt/spotlight/es http://0.0.0.0:80/rest/
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryQuantizedCountStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (42 ms)
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryTokenTypeStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryTokenTypeStore - Creating reverse-lookup for Tokens.
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (2026 ms)
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemorySurfaceFormStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemorySurfaceFormStore - Summing total SF counts.
[main] INFO org.dbpedia.spotlight.db.memory.MemorySurfaceFormStore - Creating reverse-lookup for surface forms, adding normalized surface forms.
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (7156 ms)
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryResourceStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryResourceStore - Creating reverse-lookup for DBpedia resources.
[main] INFO org.dbpedia.spotlight.db.memory.MemoryResourceStore - Counting total support...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryResourceStore - Done.
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (2266 ms)
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryCandidateMapStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (1482 ms)
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryContextStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (25469 ms)

After that I send the resquest:

jhernandez@DESKTOP-6LIFDE8:~$ curl http://localhost:2224/rest/annotate --data-urlencode "text=President Obama called Wednesday on Congress to extend a tax break for students included in last year's economic stimulus package, arguing that the policy provides more generous assistance." --data "confidence=0.35" -H "Accept: text/turtle"
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .
@prefix itsrdf: <http://www.w3.org/2005/11/its/rdf#> .
@prefix nif:   <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#> .

<http://www.dbpedia-spotlight.com/#offset_23_32>
        a                       nif:Phrase , nif:OffsetBasedString ;
        nif:anchorOf            "Wednesday" ;
        nif:beginIndex          "23"^^xsd:nonNegativeInteger ;
        nif:endIndex            "32"^^xsd:nonNegativeInteger ;
        nif:referenceContext    <http://www.dbpedia-spotlight.com/#offset_0_189> ;
        itsrdf:taAnnotatorsRef  <http://www.dbpedia-spotlight.com> ;
        itsrdf:taClassRef       <http://www.wikidata.org/entity/Q937857> , <Http://xmlns.com/foaf/0.1/Person> , <http://dbpedia.org/ontology/Agent> , <http://dbpedia.org/ontology/SoccerPlayer> , <http://www.wikidata.org/entity/Q5> , <http://dbpedia.org/ontology/Person> , <http://dbpedia.org/ontology/Athlete> , <http://www.wikidata.org/entity/Q215627> , <http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#Agent> , <http://schema.org/Person> , <http://www.wikidata.org/entity/Q24229398> , <http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#NaturalPerson> ;
        itsrdf:taConfidence     "0.5502101090744884"^^xsd:double ;
        itsrdf:taIdentRef       <http://dbpedia.org/resource/Sheffield_Wednesday_Football_Club> .

<http://www.dbpedia-spotlight.com/#collection>
        a               nif:ContextCollection ;
        nif:hasContext  <http://www.dbpedia-spotlight.com/#offset_0_189> ;
        <http://purl.org/dc/terms/conformsTo>
                <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core/2.1> .

<http://www.dbpedia-spotlight.com/#offset_0_189>
        a               nif:OffsetBasedString , nif:Context ;
        nif:beginIndex  "0"^^xsd:nonNegativeInteger ;
        nif:endIndex    "189"^^xsd:nonNegativeInteger ;
        nif:isString    "President Obama called Wednesday on Congress to extend a tax break for students included in last year's economic stimulus package, arguing that the policy provides more generous assistance." .

<http://www.dbpedia-spotlight.com/#offset_10_15>
        a                       nif:OffsetBasedString , nif:Phrase ;
        nif:anchorOf            "Obama" ;
        nif:beginIndex          "10"^^xsd:nonNegativeInteger ;
        nif:endIndex            "15"^^xsd:nonNegativeInteger ;
        nif:referenceContext    <http://www.dbpedia-spotlight.com/#offset_0_189> ;
        itsrdf:taAnnotatorsRef  <http://www.dbpedia-spotlight.com> ;
        itsrdf:taClassRef       <http://dbpedia.org/ontology/Person> , <http://www.wikidata.org/entity/Q5> , <http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#NaturalPerson> , <Http://xmlns.com/foaf/0.1/Person> , <http://www.wikidata.org/entity/Q215627> , <http://dbpedia.org/ontology/Agent> , <http://schema.org/Person> , <http://www.wikidata.org/entity/Q24229398> , <http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#Agent> ;
        itsrdf:taConfidence     "0.9999999999977263"^^xsd:double ;
        itsrdf:taIdentRef       <http://dbpedia.org/resource/Barack_Obama> .
jhernandez@DESKTOP-6LIFDE8:~$

I hope this example helps …

Hello @JulioNoe I’ve run the same examples and i still get the curl 52 error. I have no idea of what could be causing it. But I am running it on OSX and from this point I am assuming is an issue outside of the docker scope. Please let me know if you have any suggestions on how to deal with it.

Best,
Lucas.

Hi @lucas0 ,

Sounds interesting, could you please paste the output of:

docker logs dbpedia-spotlight.es

Maybe the log could give us some clues about the problem.

Sorry about the long message:

docker logs dbpedia-spotlight.es
Selected language: es
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1410 100 119 100 1291 58 634 0:00:02 0:00:02 --:–:-- 693
http://downloads.dbpedia.org/repo/dbpedia/spotlight/spotlight-model/2021.09.01/spotlight-model_lang=es.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
40 483M 40 195M 0 0 230k 0 0:35:50 0:14:29 0:21:21 0
curl: (18) transfer closed with 302094905 bytes remaining to read
es/
es/spotter_thresholds.txt
es/fsa_dict.mem
es/model.properties
es/model/
es/model/sf.mem
es/model/context.mem
tar: unexpected end of file
tar: short read
/opt/spotlight/models/es http://0.0.0.0:80/rest/
Exception in thread “main” java.io.IOException: Invalid Spotlight model folder: Could not read required file tokens.mem in /opt/spotlight/models/es/model/tokens.mem.
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:48)
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:46)
at scala.collection.immutable.List.foreach(List.scala:318)
at org.dbpedia.spotlight.db.SpotlightModel$.storesFromFolder(SpotlightModel.scala:45)
at org.dbpedia.spotlight.db.SpotlightModel$.fromFolder(SpotlightModel.scala:80)
at org.dbpedia.spotlight.db.SpotlightModel.fromFolder(SpotlightModel.scala)
at org.dbpedia.spotlight.web.rest.Server.initByModel(Server.java:239)
at org.dbpedia.spotlight.web.rest.Server.main(Server.java:87)
Selected language: es
/opt/spotlight/es http://0.0.0.0:80/rest/
Exception in thread “main” java.io.IOException: Invalid Spotlight model folder: Could not read required file tokens.mem in /opt/spotlight/models/es/model/tokens.mem.
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:48)
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:46)
at scala.collection.immutable.List.foreach(List.scala:318)
at org.dbpedia.spotlight.db.SpotlightModel$.storesFromFolder(SpotlightModel.scala:45)
at org.dbpedia.spotlight.db.SpotlightModel$.fromFolder(SpotlightModel.scala:80)
at org.dbpedia.spotlight.db.SpotlightModel.fromFolder(SpotlightModel.scala)
at org.dbpedia.spotlight.web.rest.Server.initByModel(Server.java:239)
at org.dbpedia.spotlight.web.rest.Server.main(Server.java:87)
Selected language: es
/opt/spotlight/es http://0.0.0.0:80/rest/
Exception in thread “main” java.io.IOException: Invalid Spotlight model folder: Could not read required file tokens.mem in /opt/spotlight/models/es/model/tokens.mem.
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:48)
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:46)
at scala.collection.immutable.List.foreach(List.scala:318)
at org.dbpedia.spotlight.db.SpotlightModel$.storesFromFolder(SpotlightModel.scala:45)
at org.dbpedia.spotlight.db.SpotlightModel$.fromFolder(SpotlightModel.scala:80)
at org.dbpedia.spotlight.db.SpotlightModel.fromFolder(SpotlightModel.scala)
at org.dbpedia.spotlight.web.rest.Server.initByModel(Server.java:239)
at org.dbpedia.spotlight.web.rest.Server.main(Server.java:87)
Selected language: es
/opt/spotlight/es http://0.0.0.0:80/rest/
Exception in thread “main” java.io.IOException: Invalid Spotlight model folder: Could not read required file tokens.mem in /opt/spotlight/models/es/model/tokens.mem.
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:48)
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:46)
at scala.collection.immutable.List.foreach(List.scala:318)
at org.dbpedia.spotlight.db.SpotlightModel$.storesFromFolder(SpotlightModel.scala:45)
at org.dbpedia.spotlight.db.SpotlightModel$.fromFolder(SpotlightModel.scala:80)
at org.dbpedia.spotlight.db.SpotlightModel.fromFolder(SpotlightModel.scala)
at org.dbpedia.spotlight.web.rest.Server.initByModel(Server.java:239)
at org.dbpedia.spotlight.web.rest.Server.main(Server.java:87)
Selected language: es
/opt/spotlight/es http://0.0.0.0:80/rest/
Exception in thread “main” java.io.IOException: Invalid Spotlight model folder: Could not read required file tokens.mem in /opt/spotlight/models/es/model/tokens.mem.
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:48)
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:46)
at scala.collection.immutable.List.foreach(List.scala:318)
at org.dbpedia.spotlight.db.SpotlightModel$.storesFromFolder(SpotlightModel.scala:45)
at org.dbpedia.spotlight.db.SpotlightModel$.fromFolder(SpotlightModel.scala:80)
at org.dbpedia.spotlight.db.SpotlightModel.fromFolder(SpotlightModel.scala)
at org.dbpedia.spotlight.web.rest.Server.initByModel(Server.java:239)
at org.dbpedia.spotlight.web.rest.Server.main(Server.java:87)
Selected language: es
/opt/spotlight/es http://0.0.0.0:80/rest/
Exception in thread “main” java.io.IOException: Invalid Spotlight model folder: Could not read required file tokens.mem in /opt/spotlight/models/es/model/tokens.mem.
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:48)
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:46)
at scala.collection.immutable.List.foreach(List.scala:318)
at org.dbpedia.spotlight.db.SpotlightModel$.storesFromFolder(SpotlightModel.scala:45)
at org.dbpedia.spotlight.db.SpotlightModel$.fromFolder(SpotlightModel.scala:80)
at org.dbpedia.spotlight.db.SpotlightModel.fromFolder(SpotlightModel.scala)
at org.dbpedia.spotlight.web.rest.Server.initByModel(Server.java:239)
at org.dbpedia.spotlight.web.rest.Server.main(Server.java:87)
Selected language: es
/opt/spotlight/es http://0.0.0.0:80/rest/
Exception in thread “main” java.io.IOException: Invalid Spotlight model folder: Could not read required file tokens.mem in /opt/spotlight/models/es/model/tokens.mem.
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:48)
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:46)
at scala.collection.immutable.List.foreach(List.scala:318)
at org.dbpedia.spotlight.db.SpotlightModel$.storesFromFolder(SpotlightModel.scala:45)
at org.dbpedia.spotlight.db.SpotlightModel$.fromFolder(SpotlightModel.scala:80)
at org.dbpedia.spotlight.db.SpotlightModel.fromFolder(SpotlightModel.scala)
at org.dbpedia.spotlight.web.rest.Server.initByModel(Server.java:239)
at org.dbpedia.spotlight.web.rest.Server.main(Server.java:87)
Selected language: es
/opt/spotlight/es http://0.0.0.0:80/rest/
Exception in thread “main” java.io.IOException: Invalid Spotlight model folder: Could not read required file tokens.mem in /opt/spotlight/models/es/model/tokens.mem.
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:48)
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:46)
at scala.collection.immutable.List.foreach(List.scala:318)
at org.dbpedia.spotlight.db.SpotlightModel$.storesFromFolder(SpotlightModel.scala:45)
at org.dbpedia.spotlight.db.SpotlightModel$.fromFolder(SpotlightModel.scala:80)
at org.dbpedia.spotlight.db.SpotlightModel.fromFolder(SpotlightModel.scala)
at org.dbpedia.spotlight.web.rest.Server.initByModel(Server.java:239)
at org.dbpedia.spotlight.web.rest.Server.main(Server.java:87)
Selected language: es
/opt/spotlight/es http://0.0.0.0:80/rest/
Exception in thread “main” java.io.IOException: Invalid Spotlight model folder: Could not read required file tokens.mem in /opt/spotlight/models/es/model/tokens.mem.
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:48)
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:46)
at scala.collection.immutable.List.foreach(List.scala:318)
at org.dbpedia.spotlight.db.SpotlightModel$.storesFromFolder(SpotlightModel.scala:45)
at org.dbpedia.spotlight.db.SpotlightModel$.fromFolder(SpotlightModel.scala:80)
at org.dbpedia.spotlight.db.SpotlightModel.fromFolder(SpotlightModel.scala)
at org.dbpedia.spotlight.web.rest.Server.initByModel(Server.java:239)
at org.dbpedia.spotlight.web.rest.Server.main(Server.java:87)
Selected language: es
/opt/spotlight/es http://0.0.0.0:80/rest/
Exception in thread “main” java.io.IOException: Invalid Spotlight model folder: Could not read required file tokens.mem in /opt/spotlight/models/es/model/tokens.mem.
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:48)
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:46)
at scala.collection.immutable.List.foreach(List.scala:318)
at org.dbpedia.spotlight.db.SpotlightModel$.storesFromFolder(SpotlightModel.scala:45)
at org.dbpedia.spotlight.db.SpotlightModel$.fromFolder(SpotlightModel.scala:80)
at org.dbpedia.spotlight.db.SpotlightModel.fromFolder(SpotlightModel.scala)
at org.dbpedia.spotlight.web.rest.Server.initByModel(Server.java:239)
at org.dbpedia.spotlight.web.rest.Server.main(Server.java:87)
Selected language: es
/opt/spotlight/es http://0.0.0.0:80/rest/
Exception in thread “main” java.io.IOException: Invalid Spotlight model folder: Could not read required file tokens.mem in /opt/spotlight/models/es/model/tokens.mem.
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:48)
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:46)
at scala.collection.immutable.List.foreach(List.scala:318)
at org.dbpedia.spotlight.db.SpotlightModel$.storesFromFolder(SpotlightModel.scala:45)
at org.dbpedia.spotlight.db.SpotlightModel$.fromFolder(SpotlightModel.scala:80)
at org.dbpedia.spotlight.db.SpotlightModel.fromFolder(SpotlightModel.scala)
at org.dbpedia.spotlight.web.rest.Server.initByModel(Server.java:239)
at org.dbpedia.spotlight.web.rest.Server.main(Server.java:87)
Selected language: es
/opt/spotlight/es http://0.0.0.0:80/rest/
Exception in thread “main” java.io.IOException: Invalid Spotlight model folder: Could not read required file tokens.mem in /opt/spotlight/models/es/model/tokens.mem.
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:48)
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:46)
at scala.collection.immutable.List.foreach(List.scala:318)
at org.dbpedia.spotlight.db.SpotlightModel$.storesFromFolder(SpotlightModel.scala:45)
at org.dbpedia.spotlight.db.SpotlightModel$.fromFolder(SpotlightModel.scala:80)
at org.dbpedia.spotlight.db.SpotlightModel.fromFolder(SpotlightModel.scala)
at org.dbpedia.spotlight.web.rest.Server.initByModel(Server.java:239)
at org.dbpedia.spotlight.web.rest.Server.main(Server.java:87)
Selected language: es
/opt/spotlight/es http://0.0.0.0:80/rest/
Exception in thread “main” java.io.IOException: Invalid Spotlight model folder: Could not read required file tokens.mem in /opt/spotlight/models/es/model/tokens.mem.
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:48)
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:46)
at scala.collection.immutable.List.foreach(List.scala:318)
at org.dbpedia.spotlight.db.SpotlightModel$.storesFromFolder(SpotlightModel.scala:45)
at org.dbpedia.spotlight.db.SpotlightModel$.fromFolder(SpotlightModel.scala:80)
at org.dbpedia.spotlight.db.SpotlightModel.fromFolder(SpotlightModel.scala)
at org.dbpedia.spotlight.web.rest.Server.initByModel(Server.java:239)
at org.dbpedia.spotlight.web.rest.Server.main(Server.java:87)
Selected language: es
/opt/spotlight/es http://0.0.0.0:80/rest/
Exception in thread “main” java.io.IOException: Invalid Spotlight model folder: Could not read required file tokens.mem in /opt/spotlight/models/es/model/tokens.mem.
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:48)
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:46)
at scala.collection.immutable.List.foreach(List.scala:318)
at org.dbpedia.spotlight.db.SpotlightModel$.storesFromFolder(SpotlightModel.scala:45)
at org.dbpedia.spotlight.db.SpotlightModel$.fromFolder(SpotlightModel.scala:80)
at org.dbpedia.spotlight.db.SpotlightModel.fromFolder(SpotlightModel.scala)
at org.dbpedia.spotlight.web.rest.Server.initByModel(Server.java:239)
at org.dbpedia.spotlight.web.rest.Server.main(Server.java:87)
Selected language: es
/opt/spotlight/es http://0.0.0.0:80/rest/
Exception in thread “main” java.io.IOException: Invalid Spotlight model folder: Could not read required file tokens.mem in /opt/spotlight/models/es/model/tokens.mem.
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:48)
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:46)
at scala.collection.immutable.List.foreach(List.scala:318)
at org.dbpedia.spotlight.db.SpotlightModel$.storesFromFolder(SpotlightModel.scala:45)
at org.dbpedia.spotlight.db.SpotlightModel$.fromFolder(SpotlightModel.scala:80)
at org.dbpedia.spotlight.db.SpotlightModel.fromFolder(SpotlightModel.scala)
at org.dbpedia.spotlight.web.rest.Server.initByModel(Server.java:239)
at org.dbpedia.spotlight.web.rest.Server.main(Server.java:87)
Selected language: es
/opt/spotlight/es http://0.0.0.0:80/rest/
Exception in thread “main” java.io.IOException: Invalid Spotlight model folder: Could not read required file tokens.mem in /opt/spotlight/models/es/model/tokens.mem.
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:48)
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:46)
at scala.collection.immutable.List.foreach(List.scala:318)
at org.dbpedia.spotlight.db.SpotlightModel$.storesFromFolder(SpotlightModel.scala:45)
at org.dbpedia.spotlight.db.SpotlightModel$.fromFolder(SpotlightModel.scala:80)
at org.dbpedia.spotlight.db.SpotlightModel.fromFolder(SpotlightModel.scala)
at org.dbpedia.spotlight.web.rest.Server.initByModel(Server.java:239)
at org.dbpedia.spotlight.web.rest.Server.main(Server.java:87)
Selected language: es
/opt/spotlight/es http://0.0.0.0:80/rest/
Exception in thread “main” java.io.IOException: Invalid Spotlight model folder: Could not read required file tokens.mem in /opt/spotlight/models/es/model/tokens.mem.
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:48)
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:46)
at scala.collection.immutable.List.foreach(List.scala:318)
at org.dbpedia.spotlight.db.SpotlightModel$.storesFromFolder(SpotlightModel.scala:45)
at org.dbpedia.spotlight.db.SpotlightModel$.fromFolder(SpotlightModel.scala:80)
at org.dbpedia.spotlight.db.SpotlightModel.fromFolder(SpotlightModel.scala)
at org.dbpedia.spotlight.web.rest.Server.initByModel(Server.java:239)
at org.dbpedia.spotlight.web.rest.Server.main(Server.java:87)
Selected language: es
/opt/spotlight/es http://0.0.0.0:80/rest/
Exception in thread “main” java.io.IOException: Invalid Spotlight model folder: Could not read required file tokens.mem in /opt/spotlight/models/es/model/tokens.mem.
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:48)
at org.dbpedia.spotlight.db.SpotlightModel$$anonfun$storesFromFolder$1.apply(SpotlightModel.scala:46)
at scala.collection.immutable.List.foreach(List.scala:318)
at org.dbpedia.spotlight.db.SpotlightModel$.storesFromFolder(SpotlightModel.scala:45)
at org.dbpedia.spotlight.db.SpotlightModel$.fromFolder(SpotlightModel.scala:80)
at org.dbpedia.spotlight.db.SpotlightModel.fromFolder(SpotlightModel.scala)
at org.dbpedia.spotlight.web.rest.Server.initByModel(Server.java:239)
at org.dbpedia.spotlight.web.rest.Server.main(Server.java:87)

Thanks @lucas0

For some reason, the communication is cut/closed and the model is not downloaded.

The next lines are just the consequence of this interruption (Spotlight is started but there is no information in the folder /opt/spotlight/models/es ).

The problem could be related with the internet connection, a firewall, etc.

@JulioNoe Is that during the downloading of the model or the curl request?

Edit1: Apparently it is during the download. Which tries to download the same files from the dockerhub. I have downloaded these files for the english version and I wonder how can I used those local files instead of trying to download them again.

docker ps sheds some light into the matter:

CONTAINER ID        IMAGE                       COMMAND             CREATED             STATUS                          PORTS                  NAMES
d4ab9c0faf47        dbpedia/dbpedia-spotlight   "spotlight.sh es"   About an hour ago   Restarting (1) 43 seconds ago                          dbpedia-spotlight.es
71d7fe7b2f04        dbpedia/dbpedia-spotlight   "spotlight.sh en"   3 hours ago         Up 2 minutes                    0.0.0.0:2222->80/tcp   dbpedia-spotlight.en

it does look like the es version has a problem and cant be loaded. Here is the log for the en version (after killing, removing and running it again):

docker logs dbpedia-spotlight.en
Selected language: en
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1410  100   119  100  1291     74    805  0:00:01  0:00:01 --:--:--   880
http://downloads.dbpedia.org/repo/dbpedia/spotlight/spotlight-model/2021.09.01/spotlight-model_lang=en.tar.gz
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

yes, that is all the log has to show. Another docker ps tells me the model is running although there was nothing downloaded (the run command didn’t last 30s and should(?) have downloaded more than 2GB of data).

docker ps
CONTAINER ID        IMAGE                       COMMAND             CREATED             STATUS              PORTS                  NAMES
d1adee8368f0        dbpedia/dbpedia-spotlight   "spotlight.sh en"   23 seconds ago      Up 22 seconds       0.0.0.0:2222->80/tcp   dbpedia-spotlight.en

now requesting annotation:

curl http://localhost:2222/rest/annotate --data-urlencode "text=President Obama called Wednesday on Congress to extend a tax break for students included in last year's economic stimulus package, arguing that the policy provides more generous assistance." --data "confidence=0.35" -H "Accept: text/turtle"
curl: (52) Empty reply from server

Best Regards,
Lucas.

@lucas0, its during the downloading because it downloads 195M of 483M.

@lucas0, yes it is normal, it is requesting the file. You need to wait a little until the log get the new information (the remaining downloading part) or until finished to download the model… the English model is greater than 2 GB then the waiting will be a little bit longer hehe

Hi @lucas0,

The following is another way to run the docker spotlight (with docker-compose):

  1. Create a docker-compose file, for example, spotlight-compose.yml
  2. Create a new volume called dbp-volume: docker volume create dbp-model
    This step is to avoid conflicts with the old volume spotlight-models
  3. Copy-paste the following code
version: '3.5'
   services:
     spotlight.es:
       image: dbpedia/dbpedia-spotlight
       container_name: dbpedia-spotlight.es
       volumes:
          - dbp-model:/opt/spotlight/models
       restart: unless-stopped
       ports:
         - "0.0.0.0:2223:80"
      command: /bin/spotlight.sh es
 
  volumes:
    dbp-model:
      external: true
  1. Run docker-compose:
    docker-compose -f spotlight-compose.yml up
  2. Wait until appears the following log:
    dbpedia-spotlight.es | /opt/spotlight/es http://0.0.0.0:80/rest/
    That means spotlight is running
  3. Send a request:
curl http://localhost:2223/rest/annotate --data-urlencode "text=President Obama called Wednesday on Congress to extend a tax break for students included in last year's economic stimulus package, arguing that the policy provides more generous assistance." --data "confidence=0.35" -H "Accept: text/turtle"

With these instructions, you will be able to follow the “up” process and check any error that could happen during the download, for example…

If everything goes ok, you can execute: docker-compose -f spotlight-compose.yml up -d to run spotlight on the background.

I hope this helps you.

1 Like

Hello, @JulioNoe

I have removed my volumes so I have decided to create a new model with the original name of spotlight-models. Here is the .yml compose file, based on yours:

version: '3.5'
services:
    spotlight.en:
        image: dbpedia/dbpedia-spotlight
        container_name: dbpedia-spotlight.en
        volumes:
            - spotlight-models:/opt/spotlight/models
        restart: unless-stopped
        ports:
            - "0.0.0.0:2223:80"
        command: /bin/spotlight.sh en

    volumes:
        spotlight-models:
            external: true

and this is the error it yields.

docker-compose -f spotlight-compose.yml up
Creating network "lux_default" with the default driver
Creating dbpedia-spotlight.en ... done
Attaching to dbpedia-spotlight.en
dbpedia-spotlight.en | Selected language: en
dbpedia-spotlight.en |   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
dbpedia-spotlight.en |                                  Dload  Upload   Total   Spent    Left  Speed
100  1410  100   119  100  1291    111   1208  0:00:01  0:00:01 --:--:--  1320
dbpedia-spotlight.en | http://downloads.dbpedia.org/repo/dbpedia/spotlight/spotlight-model/2021.09.01/spotlight-model_lang=en.tar.gz
dbpedia-spotlight.en |   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
dbpedia-spotlight.en |                                  Dload  Upload   Total   Spent    Left  Speed

I am assuming it is downloading but there are no progress messages… is that the usual behavior?


Update1: I’ve opened another terminal where docker logs dbpedia-spotlight.en
yields:

Selected language: en
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1410  100   119  100  1291    111   1208  0:00:01  0:00:01 --:--:--  1320
http://downloads.dbpedia.org/repo/dbpedia/spotlight/spotlight-model/2021.09.01/spotlight-model_lang=en.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 51 2144M   51 1109M    0     0  2750k      0  0:13:18  0:06:52  0:06:25 1415k

So apparently it is downloading! I’ll report further progress here.

Thanks once again for the support!

@JulioNoe @kurzum It finished downloading as per the log info:

docker logs dbpedia-spotlight.en
Selected language: en
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1410  100   119  100  1291    111   1208  0:00:01  0:00:01 --:--:--  1320
http://downloads.dbpedia.org/repo/dbpedia/spotlight/spotlight-model/2021.09.01/spotlight-model_lang=en.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 2144M  100 2144M    0     0  2254k      0  0:16:14  0:16:14 --:--:-- 1166k

Then I assume it starts mounting the files:

en/
en/spotter_thresholds.txt
en/fsa_dict.mem
en/model.properties
en/model/
en/model/sf.mem
en/model/context.mem
en/model/candmap.mem
en/model/res.mem
en/model/quantized_counts.mem
en/model/tokens.mem
en/stopwords.list

and tries to run the command specified on the .yml. This segment is repeated many times in the logs, i guess that is because the image keeps trying to run the .sh file without success.

/opt/spotlight/models/en http://0.0.0.0:80/rest/
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryQuantizedCountStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (74 ms)
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryTokenTypeStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryTokenTypeStore - Creating reverse-lookup for Tokens.
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (6945 ms)
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemorySurfaceFormStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemorySurfaceFormStore - Summing total SF counts.
[main] INFO org.dbpedia.spotlight.db.memory.MemorySurfaceFormStore - Creating reverse-lookup for surface forms, adding normalized surface forms.
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (80750 ms)
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryResourceStore...
Killed

The first time it builds the memory usage of com.docker.hyperkit process till about 4GB (I still had around 4GB free of RAM) then it yields Killed.

The curl request yields the same error 52.

Does anyone knows what is the solution for that? Could it be that volumes have a default max allowance of 4GB?

Best,
Lucas.

Hi @lucas0,

Thanks for the updates.

This time the process is correct. The English language is the heaviest and it takes several time until being ready (also depends on the hardware).

The first step is to download the language model.

The second step is to put everything in memory, the time invested in this step will depend directly on the hardware of the host. In my case, I have 16 GB of RAM and it took 4 minutes approx in the Loading MemoryContextStore... step.

The 52 error is because the model was not successfully loaded into memory

The following is the trace of my compose file:

jhernandez@DESKTOP-6LIFDE8:~$ docker-compose -f compose.yml up
Building with native build. Learn about native build in Compose here: https://docs.docker.com/go/compose-native-build/
Creating network "jhernandez_default" with the default driver
Pulling spotlight.en (dbpedia/dbpedia-spotlight:)...
latest: Pulling from dbpedia/dbpedia-spotlight
e7c96db7181b: Pull complete
f910a506b6cb: Pull complete
b6abafe80f63: Pull complete
54cd1b8a02b8: Pull complete
8e0905f6c0f0: Pull complete
cc062f7b308d: Pull complete
45efe250a884: Pull complete
Digest: sha256:89cd13d0ea29b7a0869ead2553d652219552b2d6bb2e85780ed6d9fb3ed42a0b
Status: Downloaded newer image for dbpedia/dbpedia-spotlight:latest
Creating dbpedia-spotlight.en ... done
Attaching to dbpedia-spotlight.en
dbpedia-spotlight.en | Selected language: en
dbpedia-spotlight.en |   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
dbpedia-spotlight.en |                                  Dload  Upload   Total   Spent    Left  Speed
100  1410  100   119  100  1291    154   1678 --:--:-- --:--:-- --:--:--  1831
dbpedia-spotlight.en | http://downloads.dbpedia.org/repo/dbpedia/spotlight/spotlight-model/2021.09.01/spotlight-model_lang=en.tar.gz
dbpedia-spotlight.en |   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
dbpedia-spotlight.en |                                  Dload  Upload   Total   Spent    Left  Speed
100 2144M  100 2144M    0     0  27.0M      0  0:01:19  0:01:19 --:--:-- 28.4M
dbpedia-spotlight.en | en/
dbpedia-spotlight.en | en/spotter_thresholds.txt
dbpedia-spotlight.en | en/fsa_dict.mem
dbpedia-spotlight.en | en/model.properties
dbpedia-spotlight.en | en/model/
dbpedia-spotlight.en | en/model/sf.mem
dbpedia-spotlight.en | en/model/context.mem
dbpedia-spotlight.en | en/model/candmap.mem
dbpedia-spotlight.en | en/model/res.mem
dbpedia-spotlight.en | en/model/quantized_counts.mem
dbpedia-spotlight.en | en/model/tokens.mem
dbpedia-spotlight.en | en/stopwords.list
dbpedia-spotlight.en | /opt/spotlight/models/en http://0.0.0.0:80/rest/
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryQuantizedCountStore...
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (48 ms)
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryTokenTypeStore...
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryTokenTypeStore - Creating reverse-lookup for Tokens.
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (4307 ms)
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemorySurfaceFormStore...
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemorySurfaceFormStore - Summing total SF counts.
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemorySurfaceFormStore - Creating reverse-lookup for surface forms, adding normalized surface forms.
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (34692 ms)
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryResourceStore...
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryResourceStore - Creating reverse-lookup for DBpedia resources.
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryResourceStore - Counting total support...
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryResourceStore - Done.
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (11661 ms)
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryCandidateMapStore...
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (5634 ms)
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryContextStore...
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (121971 ms)
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading FSADictionary...
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (3521 ms)
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.web.rest.Server - Initiated 1 disambiguators.
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.web.rest.Server - Initiated 2 spotters.
dbpedia-spotlight.en | Oct 20, 2021 2:35:21 PM com.sun.grizzly.Controller logVersion
dbpedia-spotlight.en | INFO: GRIZZLY0001: Starting Grizzly Framework 1.9.48 - 10/20/21 2:35 PM
dbpedia-spotlight.en | Server started in /opt/spotlight listening on http://0.0.0.0:80/rest
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.web.rest.Server -  Core threads: 5
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.web.rest.Server -   Max threads: 5
dbpedia-spotlight.en | [main] INFO org.dbpedia.spotlight.web.rest.Server - Max POST size: 2097152

and this is my compose file

version: '3.5'
 services:
   spotlight.en:
     image: dbpedia/dbpedia-spotlight
     container_name: dbpedia-spotlight.en
     volumes:
        - dbp-model:/opt/spotlight/models
     restart: unless-stopped
     ports:
        - "0.0.0.0:2223:80"
     command: /bin/spotlight.sh en

 volumes:
   dbp-model:
     external: true

@JulioNoe I also have 16GB and apparently that is not enough to load a 2GB model. My compose file is exactly the same with exception of the port number and the volume name, which shouldn’t affect the results.

the logs still give the same results:

Selected language: en
/opt/spotlight/en http://0.0.0.0:80/rest/
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryQuantizedCountStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (44 ms)
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryTokenTypeStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemoryTokenTypeStore - Creating reverse-lookup for Tokens.
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (6048 ms)
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemorySurfaceFormStore...
[main] INFO org.dbpedia.spotlight.db.memory.MemorySurfaceFormStore - Summing total SF counts.
[main] INFO org.dbpedia.spotlight.db.memory.MemorySurfaceFormStore - Creating reverse-lookup for surface forms, adding normalized surface forms.
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Done (187816 ms)
[main] INFO org.dbpedia.spotlight.db.memory.MemoryStore$ - Loading MemoryResourceStore...
Killed

Given the log errors, is there any suggestion on how to make it work?

Best,
Lucas.

1 Like