Files
presidio/Dockerfile.python.deps
2021-02-05 20:44:43 +02:00

26 lines
662 B
Docker

FROM python:3.7-slim
ARG NAME=presidio-analyzer
ENV PIP_NO_CACHE_DIR true
COPY ./${NAME}/Pipfile /usr/bin/${NAME}/Pipfile
COPY ./${NAME}/Pipfile.lock /usr/bin/${NAME}/Pipfile.lock
WORKDIR /usr/bin/${NAME}
RUN apt-get update && apt-get -y install gcc
# Making sure we have pipenv
RUN pip install pipenv
# Updating setuptools
RUN pip install --upgrade setuptools
# Installing specified packages from Pipfile.lock
RUN bash -c 'PIPENV_VENV_IN_PROJECT=1 pipenv sync'
# Install for tests, consider making this optional
RUN pipenv run python -m spacy download en_core_web_lg
# Print to screen the installed packages for easy debugging
RUN pipenv run pip freeze