nlp/Dockerfile

58 lines
1.6 KiB
Docker
Raw Normal View History

2019-06-02 21:45:17 +02:00
FROM debian:9-slim
2019-02-06 16:58:17 +01:00
2019-09-11 13:20:07 +02:00
2019-09-11 13:34:01 +02:00
# Define image metadata
2019-05-20 11:28:51 +02:00
LABEL maintainer="inf_sfb1288@lists.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
2019-09-11 13:20:07 +02:00
# Install prerequisites
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
2020-04-03 17:35:05 +02:00
build-essential \
2019-09-11 13:20:07 +02:00
python2.7 \
python3.5 \
2020-04-03 17:35:05 +02:00
python3-dev \
2019-09-11 13:20:07 +02:00
python3-pip \
2020-01-20 15:09:38 +01:00
zip \
2019-09-11 13:20:07 +02:00
&& rm -rf /var/lib/apt/lists/* \
&& pip3 install \
setuptools \
2020-02-12 13:48:30 +01:00
wheel \
chardet
2019-09-11 13:20:07 +02:00
ENV PYFLOW_VERSION=1.1.20
ADD "https://github.com/Illumina/pyflow/releases/download/v${PYFLOW_VERSION}/pyflow-${PYFLOW_VERSION}.tar.gz" .
RUN tar -xzf "pyflow-${PYFLOW_VERSION}.tar.gz" \
&& cd "pyflow-${PYFLOW_VERSION}" \
&& python2.7 setup.py build install \
&& cd .. \
&& rm -rf \
"pyflow-${PYFLOW_VERSION}" \
"pyflow-${PYFLOW_VERSION}.tar.gz"
2020-04-03 17:35:05 +02:00
ENV SPACY_VERSION=2.2.4
ENV SPACY_MODELS_VERSION=2.2.5
2019-09-11 13:20:07 +02:00
RUN pip3 install \
"spacy==${SPACY_VERSION}" \
2020-04-03 17:35:05 +02:00
&& python3 -m spacy download "de_core_news_sm-${SPACY_MODELS_VERSION}" --direct \
&& python3 -m spacy download "el_core_news_sm-${SPACY_MODELS_VERSION}" --direct \
&& python3 -m spacy download "en_core_web_sm-${SPACY_MODELS_VERSION}" --direct \
&& python3 -m spacy download "es_core_news_sm-${SPACY_MODELS_VERSION}" --direct \
&& python3 -m spacy download "fr_core_news_sm-${SPACY_MODELS_VERSION}" --direct \
&& python3 -m spacy download "it_core_news_sm-${SPACY_MODELS_VERSION}" --direct \
&& python3 -m spacy download "nl_core_news_sm-${SPACY_MODELS_VERSION}" --direct \
&& python3 -m spacy download "pt_core_news_sm-${SPACY_MODELS_VERSION}" --direct
2019-02-06 16:58:17 +01:00
2019-09-11 13:34:01 +02:00
# Install NLP pipeline
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
2019-05-20 11:28:51 +02:00
ENTRYPOINT ["nlp"]
2019-09-11 13:20:07 +02:00
CMD ["--help"]