I am trying to dockerize prodigy . The image was built successfully when I try to run the docker image it does not give any errors but at the same time it does not open up the service to annotate.
Here is my docker file
FROM python:3.7-slim-buster
WORKDIR /opt/app
COPY requirements.txt ./
COPY prodigy*.whl ./
COPY train_test2.jsonl ./
COPY main.py ./
RUN pip install -r requirements.txt
RUN pip install -f ./prodigy*.whl
RUN python -m spacy download en_core_web_sm
COPY --chown=python:python app .
COPY prodigy.json ./
# ENV PRODIGY_ALLOWED_SESSIONS "user1,user2"
# CMD python -m prodigy textcat.manual train_test2 train_test2.jsonl --label "POSITIVE, NEUTRAL, NEGATIVE" --exclusive
RUN useradd python
ADD main.py ./
CMD ["python", "-u", "main.py","--port", "5000"]
my docker compose file
version: '3'
services:
prodigy-test:
container_name: prodigy-test
image: prodigy-test
hostname: prodigy-test
command: python main.py run -h 0.0.0.0
build:
context: .
environment:
LOGGING_LEVEL: 'INFO'
LOGGING_WERKZEUG_ENABLED: 'True'
SERVER_PORT: '5000'
ports:
- '5000:5000'
This is my main .py
import prodigy
model = 'textcat.manual'
dataset_name = 'train_test2'
json_file = 'train_test2.jsonl'
labels = ['POSITIVE', 'NEUTRAL', 'NEGATIVE']
host = '0.0.0.0'
port = 5000
prodigy.serve(model, dataset_name, json_file, '', labels,True, None, port=port)
This is my prodigy.json
{
"host" : "0.0.0.0"
}
Any ideas on what could be missing to start the service?