jgontrum / spacy-api-docker

spaCy REST API, wrapped in a Docker container.
https://hub.docker.com/r/jgontrum/spacyapi/
MIT License
265 stars 99 forks source link

The docker documentation is incorrect and confusing #19

Closed bigman73 closed 5 years ago

bigman73 commented 5 years ago

First, I love how you wrapped up spacy in a docker container.

But the docker hub page is out of date https://hub.docker.com/r/jgontrum/spacyapi/

  1. "Updated to spaCy 1.2.0" - In github the version is 2.0.16. There is no mentioning of V2
  2. Usage of port 5000 - "docker run --name spacyapi -d -p 127.0.0.1:5000:5000 jgontrum/spacyapi:en" & "curl http://localhost:5000/api --header 'content-type: application/json' --data '{text: "This is a text that I want to be analyzed."}' -X POST"

But in the new docker image it works on port 80 (internally): "docker run -p "127.0.0.1:8080:80" jgontrum/spacyapi:en_v2" & "curl -s localhost:8000/dep -d '{"text":"Pastafarians are smarter than people with Coca Cola bottles.", "model":"en"}'"

(btw: even in the github page, the usage of port 8000 is confusing to the unsuspecting user, since the run command maps uses external port 8080)

  1. API has completely change

Please update the docker hub page to reflect the same info as the github one

dominiquevocat commented 5 years ago

actually with the current version the web ui is reachable but never displays results whereas the curl you provided gives a 502 bad gateway from the included nginx.

curl -s localhost:8080/dep -d '{"text":"Pastafarians are smarter than people with Coca Cola bottles.", "model":"en"}'
<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.10.3</center>
</body>
</html>
ghost commented 5 years ago

+1 the current version doesnt appear to be working. UI is reachable but never returns.

@dominiquevocat I wrote a spacy rest api as we needed this working asap. So far i only implemented en and fr models. Which models features do you need? I can push to github/dockerhub if you need it.

jgontrum commented 5 years ago

Just tested the UI and it seems to run perfectly for me. To prevent any future disturbances, I locked the frontend dependencies now.

Also removed the documentation on Docker Hub and linked it to this GitHub repo.