FROM nlpieumn/mtap:latest

COPY . /b9-dev/

RUN pip install --no-cache-dir /b9-dev/biomedicus_client

RUN pip install --no-cache-dir /b9-dev/ --extra-index-url https://download.pytorch.org/whl/cpu

RUN useradd -d /biomedicus -ms /bin/bash biomedicus

USER biomedicus
WORKDIR /biomedicus

RUN b9 download-data --with-stanza

EXPOSE 50000-51000
ENTRYPOINT ["b9", "deploy", "--host", "0.0.0.0"]
