Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perhaps suggest waiting period when the dbpedia spotlight docker container is run for the first time #17

Open
ChristophLeonhardt opened this issue Nov 9, 2023 · 1 comment

Comments

@ChristophLeonhardt
Copy link
Collaborator

If you run the docker container for the very first time as suggested by the README (see chunk below), the container seems to start by downloading the language model itself. I think that it is important that the container is not queried while doing so as otherwise, the download seems to be interrupted, leading to an unusable setup. Waiting for a couple of minutes in the first start up seemed to work for me, at least.

dbpedia/README.Rmd

Lines 48 to 53 in 01c5d91

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

I am not sure if this is a general problem, but maybe a hint in the README that the container might be ready to use only after a few minutes if you use it for the first time might be useful for other users as well.

@ChristophLeonhardt ChristophLeonhardt changed the title Perhaps suggest waiting period when the dbpedia spotlight docker container run the first time Perhaps suggest waiting period when the dbpedia spotlight docker container is run for the first time Nov 9, 2023
@ablaette
Copy link
Contributor

You can run this command in the terminal for checking the status of a docker container, see: https://docs.docker.com/reference/cli/docker/inspect/

docker inspect --type=container --format '{{.State.Running}}' CONTAINER-ID

You need the Container ID for this command. So to prepare querying the container like this, I included getting the Container id from calling docker container ls in dbpedia_spotlight_status().

container_id <- dbpedia_spotlight_status()[["container_id"]]
system2(
  command = "docker",
  args = c(
    "inspect",
    "--type=container",
    "--format '{{.State.Running}}'",
    container_id
  )
)

What I do not know: If the container is running, does it imply that the container is fully loaded? So we may need another flavour of docker inspect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants