nlp/Dockerfile

57 lines
2.3 KiB
Docker
Raw Normal View History

2019-06-02 19:45:17 +00:00
FROM debian:9-slim
2019-02-06 15:58:17 +00:00
2019-09-11 11:20:07 +00:00
2019-09-11 11:34:01 +00:00
# Define image metadata
2019-05-20 09:28:51 +00:00
LABEL maintainer="inf_sfb1288@lists.uni-bielefeld.de"
2019-02-06 15:58:17 +00:00
2019-09-11 11:20:07 +00:00
# Install prerequisites
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
python2.7 \
python3.5 \
python3-pip \
&& rm -rf /var/lib/apt/lists/* \
&& pip3 install \
setuptools \
wheel
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"
ENV SPACY_MODELS_DE=de_core_news_sm \
SPACY_MODELS_EL=el_core_news_sm \
SPACY_MODELS_EN=en_core_web_sm \
SPACY_MODELS_ES=es_core_news_sm \
SPACY_MODELS_FR=fr_core_news_sm \
SPACY_MODELS_IT=it_core_news_sm \
SPACY_MODELS_NL=nl_core_news_sm \
SPACY_MODELS_PT=pt_core_news_sm \
SPACY_VERSION=2.1.0
RUN pip3 install \
"spacy==${SPACY_VERSION}" \
"https://github.com/explosion/spacy-models/releases/download/${SPACY_MODELS_DE}-${SPACY_VERSION}/${SPACY_MODELS_DE}-${SPACY_VERSION}.tar.gz" \
"https://github.com/explosion/spacy-models/releases/download/${SPACY_MODELS_EL}-${SPACY_VERSION}/${SPACY_MODELS_EL}-${SPACY_VERSION}.tar.gz" \
"https://github.com/explosion/spacy-models/releases/download/${SPACY_MODELS_EN}-${SPACY_VERSION}/${SPACY_MODELS_EN}-${SPACY_VERSION}.tar.gz" \
"https://github.com/explosion/spacy-models/releases/download/${SPACY_MODELS_ES}-${SPACY_VERSION}/${SPACY_MODELS_ES}-${SPACY_VERSION}.tar.gz" \
"https://github.com/explosion/spacy-models/releases/download/${SPACY_MODELS_FR}-${SPACY_VERSION}/${SPACY_MODELS_FR}-${SPACY_VERSION}.tar.gz" \
"https://github.com/explosion/spacy-models/releases/download/${SPACY_MODELS_IT}-${SPACY_VERSION}/${SPACY_MODELS_IT}-${SPACY_VERSION}.tar.gz" \
"https://github.com/explosion/spacy-models/releases/download/${SPACY_MODELS_NL}-${SPACY_VERSION}/${SPACY_MODELS_NL}-${SPACY_VERSION}.tar.gz" \
"https://github.com/explosion/spacy-models/releases/download/${SPACY_MODELS_PT}-${SPACY_VERSION}/${SPACY_MODELS_PT}-${SPACY_VERSION}.tar.gz"
2019-02-06 15:58:17 +00:00
2019-09-11 11:34:01 +00:00
# Install NLP pipeline
2019-02-06 15:58:17 +00:00
COPY nlp /usr/local/bin
COPY spacy_nlp /usr/local/bin
2019-09-11 11:34:01 +00:00
2019-05-20 09:28:51 +00:00
ENTRYPOINT ["nlp"]
2019-09-11 11:20:07 +00:00
CMD ["--help"]