mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nlp.git
synced 2024-12-26 08:24:18 +00:00
57 lines
1.8 KiB
Docker
57 lines
1.8 KiB
Docker
FROM debian:9-slim
|
|
|
|
|
|
# Define image metadata
|
|
LABEL maintainer="inf_sfb1288@lists.uni-bielefeld.de"
|
|
|
|
|
|
# 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_MODEL_DE=de_core_news_sm \
|
|
SPACY_MODEL_EL=el_core_news_sm \
|
|
SPACY_MODEL_EN=en_core_web_sm \
|
|
SPACY_MODEL_ES=es_core_news_sm \
|
|
SPACY_MODEL_FR=fr_core_news_sm \
|
|
SPACY_MODEL_IT=it_core_news_sm \
|
|
SPACY_MODEL_NL=nl_core_news_sm \
|
|
SPACY_MODEL_PT=pt_core_news_sm \
|
|
SPACY_VERSION=2.1.0
|
|
RUN pip3 install \
|
|
"spacy==${SPACY_VERSION}" \
|
|
&& python3 -m spacy download "${SPACY_MODEL_DE}-${SPACY_VERSION}" --direct \
|
|
&& python3 -m spacy download "${SPACY_MODEL_EL}-${SPACY_VERSION}" --direct \
|
|
&& python3 -m spacy download "${SPACY_MODEL_EN}-${SPACY_VERSION}" --direct \
|
|
&& python3 -m spacy download "${SPACY_MODEL_ES}-${SPACY_VERSION}" --direct \
|
|
&& python3 -m spacy download "${SPACY_MODEL_FR}-${SPACY_VERSION}" --direct \
|
|
&& python3 -m spacy download "${SPACY_MODEL_IT}-${SPACY_VERSION}" --direct \
|
|
&& python3 -m spacy download "${SPACY_MODEL_NL}-${SPACY_VERSION}" --direct \
|
|
&& python3 -m spacy download "${SPACY_MODEL_PT}-${SPACY_VERSION}" --direct
|
|
|
|
|
|
# Install NLP pipeline
|
|
COPY nlp /usr/local/bin
|
|
COPY spacy_nlp /usr/local/bin
|
|
|
|
|
|
ENTRYPOINT ["nlp"]
|
|
CMD ["--help"]
|