File size: 846 Bytes
556476f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM python:3.9

#COPY requirements.txt /app/
WORKDIR /app

RUN --mount=type=secret,id=LICENSE_KEY,mode=0444,required=true \
    pip install --upgrade pip \
    && pip install prodigy -f https://$(cat /run/secrets/LICENSE_KEY)@download.prodi.gy
#    && pip install --trusted-host pypi.python.org -r requirements.txt

# COPY wheel/prodigy-xxx-linux_x86_64.whl ./wheel/
# RUN pip install wheel/prodigy-xxx-linux_x86_64.whl \
#     && rm -rf wheel/prodigy-xxx-linux_x86_64.whl
RUN python -m spacy download en_core_web_sm

COPY prodigy.json .
COPY data ./data/

ENV PRODIGY_HOME /app
ENV PRODIGY_LOGGING "verbose"
ENV PRODIGY_ALLOWED_SESSIONS "user1,user2"
ENV PRODIGY_BASIC_AUTH_USER "admin"
ENV PRODIGY_BASIC_AUTH_PASS "password"

EXPOSE 7860

CMD python -m prodigy ner.manual ner_news en_core_web_sm ./data/dataset.jsonl --label PERSON,ORG,PRODUCT