FROM python:3.8

MAINTAINER Andel  "andel.gugu@iais.fraunhofer.de"

RUN apt-get update -y
RUN apt-get install -y python3-pip python3-dev
RUN pip3 install --upgrade pip

ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

COPY requirements.txt ./requirements.txt
RUN pip3 install -r requirements.txt

COPY best-model.pt ./

COPY static ./static
COPY templates ./templates
COPY license-1.0.0.json model.proto model_pb2.py model_pb2_grpc.py ./
COPY app.py ner_model_server.py predict.py ./


WORKDIR /

EXPOSE 8061 8062

ENTRYPOINT [ "python3","ner_model_server.py" ]

