2020-10-08 21:17:58 +00:00
|
|
|
FROM debian:buster-slim
|
2019-02-06 15:58:17 +00:00
|
|
|
|
2019-09-11 11:20:07 +00:00
|
|
|
|
2021-02-25 10:26:11 +00:00
|
|
|
LABEL authors="Patrick Jentsch <p.jentsch@uni-bielefeld.de>, Stephan Porada <porada@posteo.de>"
|
2019-02-06 15:58:17 +00:00
|
|
|
|
2019-09-11 11:20:07 +00:00
|
|
|
|
2019-09-12 09:42:42 +00:00
|
|
|
ENV LANG=C.UTF-8
|
|
|
|
|
|
|
|
|
2021-02-25 10:26:11 +00:00
|
|
|
RUN apt-get update
|
|
|
|
|
|
|
|
|
2020-10-08 21:08:49 +00:00
|
|
|
# Install pipeline dependencies #
|
2020-09-23 13:26:53 +00:00
|
|
|
## Install pyFlow ##
|
|
|
|
ENV PYFLOW_RELEASE=1.1.20
|
|
|
|
ADD "https://github.com/Illumina/pyflow/releases/download/v${PYFLOW_RELEASE}/pyflow-${PYFLOW_RELEASE}.tar.gz" .
|
|
|
|
RUN tar -xzf "pyflow-${PYFLOW_RELEASE}.tar.gz" \
|
|
|
|
&& cd "pyflow-${PYFLOW_RELEASE}" \
|
2020-10-08 21:08:49 +00:00
|
|
|
&& apt-get install --no-install-recommends --yes \
|
2020-09-23 13:26:53 +00:00
|
|
|
python2.7 \
|
2019-09-11 11:20:07 +00:00
|
|
|
&& python2.7 setup.py build install \
|
|
|
|
&& cd .. \
|
2020-09-23 13:26:53 +00:00
|
|
|
&& rm -r "pyflow-${PYFLOW_RELEASE}" "pyflow-${PYFLOW_RELEASE}.tar.gz"
|
2020-04-06 07:21:38 +00:00
|
|
|
|
|
|
|
|
2020-10-08 21:08:49 +00:00
|
|
|
## Install spaCy ##
|
2021-02-25 10:26:11 +00:00
|
|
|
ENV SPACY_VERSION=3.0.3
|
|
|
|
RUN apt-get install --no-install-recommends --yes \
|
2020-09-23 13:26:53 +00:00
|
|
|
python3.7 \
|
|
|
|
python3-pip \
|
|
|
|
zip \
|
|
|
|
&& pip3 install \
|
|
|
|
chardet \
|
|
|
|
setuptools \
|
|
|
|
wheel \
|
2021-02-25 10:26:11 +00:00
|
|
|
&& pip3 install --upgrade pip \
|
|
|
|
&& pip3 install "spacy==${SPACY_VERSION}"
|
|
|
|
|
|
|
|
ENV SPACY_MODELS_VERSION=3.0.0
|
|
|
|
RUN python3 -m spacy download "da_core_news_md-${SPACY_MODELS_VERSION}" --direct \
|
2020-09-23 13:46:43 +00:00
|
|
|
&& python3 -m spacy download "de_core_news_md-${SPACY_MODELS_VERSION}" --direct \
|
|
|
|
&& python3 -m spacy download "el_core_news_md-${SPACY_MODELS_VERSION}" --direct \
|
|
|
|
&& python3 -m spacy download "en_core_web_md-${SPACY_MODELS_VERSION}" --direct \
|
|
|
|
&& python3 -m spacy download "es_core_news_md-${SPACY_MODELS_VERSION}" --direct \
|
|
|
|
&& python3 -m spacy download "fr_core_news_md-${SPACY_MODELS_VERSION}" --direct \
|
|
|
|
&& python3 -m spacy download "it_core_news_md-${SPACY_MODELS_VERSION}" --direct \
|
|
|
|
&& python3 -m spacy download "nl_core_news_md-${SPACY_MODELS_VERSION}" --direct \
|
2021-02-25 10:26:11 +00:00
|
|
|
&& python3 -m spacy download "pt_core_news_md-${SPACY_MODELS_VERSION}" --direct \
|
|
|
|
&& python3 -m spacy download "ru_core_news_md-${SPACY_MODELS_VERSION}" --direct \
|
|
|
|
&& python3 -m spacy download "zh_core_web_md-${SPACY_MODELS_VERSION}" --direct
|
2019-02-06 15:58:17 +00:00
|
|
|
|
2019-09-11 11:34:01 +00:00
|
|
|
|
2020-10-08 21:08:49 +00:00
|
|
|
## Install Pipeline ##
|
|
|
|
COPY nlp spacy-nlp /usr/local/bin/
|
2020-09-23 13:26:53 +00:00
|
|
|
|
|
|
|
|
2021-02-25 10:26:11 +00:00
|
|
|
RUN rm -r /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
|
2019-05-20 09:28:51 +00:00
|
|
|
ENTRYPOINT ["nlp"]
|
2019-09-11 11:20:07 +00:00
|
|
|
CMD ["--help"]
|