Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion presidio-analyzer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ RUN apt-get update \

COPY ./pyproject.toml /app/

RUN pip install poetry && poetry install --no-root --only=main -E server
RUN pip install poetry \
&& poetry install --no-root --only=main -E server \
&& rm -rf $(poetry config cache-dir)

# install nlp models specified in NLP_CONF_FILE
COPY ./install_nlp_models.py /app/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tamirkamara the install_nlp_models also does a bunch of pip installs. Maybe a better solution would be to clear cache after this step. Have you considered it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


Expand Down
4 changes: 3 additions & 1 deletion presidio-anonymizer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ WORKDIR /app
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*

COPY ./pyproject.toml /app/
RUN pip install poetry && poetry install --no-root --only=main -E server
RUN pip install poetry \
&& poetry install --no-root --only=main -E server \
&& rm -rf $(poetry config cache-dir)

COPY . /app/

Expand Down
4 changes: 3 additions & 1 deletion presidio-image-redactor/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ RUN apt-get update \
&& tesseract -v

COPY ./pyproject.toml /app/
RUN pip install poetry && poetry install --no-root --only=main -E server
RUN pip install poetry \
&& poetry install --no-root --only=main -E server\
&& rm -rf $(poetry config cache-dir)

# Install spaCy model during build (as root) so it's available to non-root user at runtime
RUN python -m spacy download en_core_web_lg
Expand Down