setting up multiple annotators on Prodigy web

Hello,

I would like to set up multiple annotators. I read in previous threads that the simplist way would be for me to run prodigy on different ports and assign each annotator a port and separate database.

My question is, How can I open prodigy on different port numbers? When I run ner.manual twice I get

ERROR: [Errno 10048] error while attempting to bind on address ('::1', 8080, 0, 0): only one usage of each socket address (protocol/network address/port) is normally permitted

Secondly, if sucessful how can I give access to the Prodigy web app? Do I just need to send the link to the annotation interface or there is something more?

Hi! Based on the error message, it sounds like you might be trying to serve Prodigy twice on the same port, which will lead to this error since something is already running on 8080 (the default port).

If you want to run it on different ports, you can use the PRODIGY_PORT environment variable, e.g.:

PRODIGY_PORT=1234 prodigy ner.manual ...

If you're serving Prodigy on the public internet or an internal network, then yes, all you need to do is point the annotators to the URL of the annotation UI. Of course, you can also make the setup more elegant by putting a reverse proxy in front of Prodigy and/or assigning it a cusom URL or subdomain – but that's not strictly necessary. You can also set up basic auth via the respective environment variables to require a username/password to access the app.

Hi Ines,

I usually insert !python -m before running any of my prodigy commands. I see that PRODIGY_PORT is not a model. How can I set it. When I just run the command as below:

PRODIGY_PORT=3902 prodigy ner.manual...

I get: Invalid syntax

When I execute:

!python -m prodigy PRODIGY_PORT=3902 prodigy ner.manual...

I get the error:

[x] Can't find recipe or command 'PRODIGY_PORT=3902'
Run prodigy --help to see available options. If you're using a custom recipe,
provide the path to the Python file using the -F argument.

This should be a python error but any ideas on how I can fix it?
Thanks

The environment variable is separate from the command you're running so you want to set them before you're calling python, i.e. PRODIGY_PORT=1234 python -m prodigy.... Alternatively, you can also use export. This page has a handy overview of how to set environment variables on Windows, Linux and Mac: How To Set Environment Variables

Hi Ines,

I havent been sucessfull with that either.

I get this upon exercution

It looks like this might be some weirdness/quirk of Jupyter Notebooks – maybe you need to use their specific syntax instead. See here:

Thank you so much Ines,

This is indeed the solution.

I ran:

%env PRODIGY_PORT = 3749
!python -m prodigy ner.manual ...

This changed the port from localhost 8080 to localhost 3749

1 Like