nlp/Dockerfile

55 lines
1.7 KiB
Docker
Raw Normal View History

2020-04-06 09:21:38 +02:00
FROM debian:10-slim
2019-02-06 16:58:17 +01:00
2019-09-11 13:20:07 +02:00
2020-09-23 15:26:53 +02:00
LABEL authors="Patrick Jentsch <p.jentsch@uni-bielefeld.de>, Stephan Porada <sporada@uni-bielefeld.de>"
2019-02-06 16:58:17 +01:00
2019-09-11 13:20:07 +02:00
2019-09-12 11:42:42 +02:00
ENV LANG=C.UTF-8
2020-09-23 15:26:53 +02:00
RUN apt-get update
2019-09-11 13:20:07 +02:00
2020-04-06 09:21:38 +02:00
2020-09-23 15:26:53 +02: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}" \
&& apt-get install -y --no-install-recommends \
python2.7 \
2019-09-11 13:20:07 +02:00
&& python2.7 setup.py build install \
&& cd .. \
2020-09-23 15:26:53 +02:00
&& rm -r "pyflow-${PYFLOW_RELEASE}" "pyflow-${PYFLOW_RELEASE}.tar.gz"
2020-04-06 09:21:38 +02:00
2020-09-23 15:26:53 +02:00
## Install Pipeline ##
ENV SPACY_VERSION=2.3.2
ENV SPACY_MODELS_VERSION=2.3.0
RUN apt-get install -y --no-install-recommends \
python3.7 \
python3-pip \
zip \
&& pip3 install \
chardet \
setuptools \
wheel \
&& pip3 install "spacy==${SPACY_VERSION}" \
&& python3 -m spacy download "de_core_news_lg-${SPACY_MODELS_VERSION}" --direct \
&& python3 -m spacy download "el_core_news_lg-${SPACY_MODELS_VERSION}" --direct \
&& python3 -m spacy download "en_core_web_lg-${SPACY_MODELS_VERSION}" --direct \
&& python3 -m spacy download "es_core_news_lg-${SPACY_MODELS_VERSION}" --direct \
&& python3 -m spacy download "fr_core_news_lg-${SPACY_MODELS_VERSION}" --direct \
&& python3 -m spacy download "it_core_news_lg-${SPACY_MODELS_VERSION}" --direct \
&& python3 -m spacy download "nl_core_news_lg-${SPACY_MODELS_VERSION}" --direct \
&& python3 -m spacy download "pt_core_news_lg-${SPACY_MODELS_VERSION}" --direct
2019-02-06 16:58:17 +01:00
COPY nlp /usr/local/bin
2020-04-03 17:35:05 +02:00
COPY spacy-nlp /usr/local/bin
2019-02-06 16:58:17 +01:00
2019-09-11 13:34:01 +02:00
2020-09-23 15:26:53 +02:00
## Cleanup ##
RUN rm -r /var/lib/apt/lists/*
2019-05-20 11:28:51 +02:00
ENTRYPOINT ["nlp"]
2019-09-11 13:20:07 +02:00
CMD ["--help"]