OSError: [Errno 99] Cannot assign requested address

So I was poking at this further and I noticed I’m only able to get this working when I use host “0.0.0.0”. With “127.0.0.1” the app starts without crashing but I can’t connect to it from a browser.

Some additional information. I’m running this in a docker container on my laptop. Networking is also not my strongest suite but usually when I run into these kinds of issues switching to 0.0.0.0 fixes things :slight_smile:

Here’s my Dockerfile:

FROM python:stretch
MAINTAINER Michael Becker

ENV PYTHONUNBUFFERED 1

COPY *linux_x86_64.whl /root
RUN pip install /root/prodigy*.whl
RUN python -m spacy download en_core_web_sm
RUN mkdir -p /root/.prodigy/
COPY prodigy.json /root/.prodigy/prodigy.json
RUN prodigy dataset gh_issues "Classify issues on GitHub"

ENTRYPOINT prodigy textcat.teach gh_issues en_core_web_sm "docs" --api github --label DOCUMENTATION

And the commands I’m running to build and run the container:

$ docker build -t prodigy-docker . 
$ docker run -it --rm --name prodigy -p 8080:8080 -d prodigy-docker

The Dockerfile requires that you have the linux prodigy wheel and a prodigy.json in the CWD

Here’s my updated prodigy.json:

{
  "host": "0.0.0.0",
}

Update: I talked with my local docker guru and we’re convinced this is a quirk of docker networking. Obviously when running these tools in production you’ll either need to bind to 0.0.0.0 or setup some kind of gateway like nginx so it probably can’t hurt to mention something about this caveat in the docs.

Thanks for the awesome tool!