FROM ubuntu:22.04

ENV DEBIAN_FRONTEND noninteractive

RUN mkdir /app
WORKDIR /app

#Install python and torch Stanford de-id requirements
RUN apt update
RUN apt install python3 python3-pip git -y
RUN pip3 install torch torchvision torchaudio

#install Stanford de-id requirements
ADD Stanford_Penn_MIDRC_Deidentifier .
RUN pip3 install -r requirements.txt

#download model files
RUN apt install git-lfs -y 
RUN git clone https://huggingface.co/StanfordAIMI/stanford-deidentifier-with-radiology-reports-and-i2b2 model_files
RUN rm -rf model_files/.git

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












