|
FROM python:3.11 |
|
|
|
RUN apt-get update \ |
|
&& apt-get -y install tesseract-ocr |
|
RUN : \ |
|
&& apt-get update \ |
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ |
|
&& apt-get clean \ |
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
ENV DEBIAN_FRONTEND=noninteractive |
|
|
|
RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y |
|
|
|
|
|
RUN apt-get update && apt-get install -y git wget |
|
|
|
|
|
RUN useradd -m -u 1000 user |
|
|
|
|
|
RUN mkdir /Responsible-AI-Privacy && chown -R user:user /Responsible-AI-Privacy |
|
|
|
USER user |
|
|
|
|
|
ENV PATH="/home/user/.local/bin:$PATH" |
|
|
|
|
|
|
|
RUN pip install --user huggingface_hub transformers git+https://github.com/huggingface/transformers.git |
|
|
|
RUN echo "added model" > /dev/null |
|
|
|
|
|
RUN git clone https://huggingface.co/InfosysResponsibleAiToolKit/Responsible-AI-Privacy /Responsible-AI-Privacy |
|
|
|
COPY --chown=user . . |
|
|
|
RUN ls -la |
|
|
|
COPY --chown=user . /Responsible-AI-Privacy/responsible-ai-privacy/lib |
|
|
|
|
|
|
|
RUN if [ ! -f "/Responsible-AI-Privacy/responsible-ai-privacy/src/privacy/util/model/craft_mlt_25k.pth" ]; then \ |
|
echo "File does not exist!"; exit 1; \ |
|
else echo "File exists!"; fi |
|
|
|
WORKDIR /Responsible-AI-Privacy/responsible-ai-privacy |
|
|
|
RUN ls -la |
|
|
|
RUN pip install --no-cache-dir /Responsible-AI-Privacy/responsible-ai-privacy/lib/en_core_web_lg-3.7.1-py3-none-any.whl |
|
|
|
RUN pip install -r requirements/requirement.txt |
|
|
|
RUN pip install datasets==2.15.0 |
|
|
|
RUN pip install numpy==1.26.2 |
|
|
|
RUN pip install torch==2.4.1 |
|
|
|
RUN pip install torchvision==0.15.1 |
|
|
|
RUN pip show torch |
|
|
|
RUN pip show torchvision |
|
|
|
WORKDIR /Responsible-AI-Privacy/responsible-ai-privacy/src |
|
|
|
EXPOSE 30002 |
|
|
|
CMD ["sh","-c","python3 privacy_main.py"] |