mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nlp.git
synced 2025-01-13 19:50:35 +00:00
Use fix version numbers.
This commit is contained in:
parent
e68d5c39ee
commit
2f57b1a0af
71
Dockerfile
71
Dockerfile
@ -1,40 +1,55 @@
|
|||||||
FROM debian:9-slim
|
FROM debian:9-slim
|
||||||
|
|
||||||
|
|
||||||
LABEL maintainer="inf_sfb1288@lists.uni-bielefeld.de"
|
LABEL maintainer="inf_sfb1288@lists.uni-bielefeld.de"
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
|
||||||
ENV LANG=C.UTF-8
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
# Install prerequisites
|
||||||
apt-get install -y --no-install-recommends \
|
RUN apt-get update \
|
||||||
build-essential \
|
&& apt-get install -y --no-install-recommends \
|
||||||
ca-certificates \
|
python2.7 \
|
||||||
python2.7 \
|
python3.5 \
|
||||||
python3.5 \
|
python3-pip \
|
||||||
python3-dev \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
python3-pip \
|
&& pip3 install \
|
||||||
python3-setuptools \
|
setuptools \
|
||||||
wget
|
wheel
|
||||||
|
|
||||||
# Install pyFlow
|
|
||||||
ENV PYFLOW_VERSION 1.1.20
|
|
||||||
RUN wget -nv https://github.com/Illumina/pyflow/releases/download/v"$PYFLOW_VERSION"/pyflow-"$PYFLOW_VERSION".tar.gz && \
|
|
||||||
tar -xzf pyflow-"$PYFLOW_VERSION".tar.gz && \
|
|
||||||
cd pyflow-"$PYFLOW_VERSION" && \
|
|
||||||
python2.7 setup.py build install && \
|
|
||||||
cd .. && \
|
|
||||||
rm -r pyflow-"$PYFLOW_VERSION" pyflow-"$PYFLOW_VERSION".tar.gz
|
|
||||||
|
|
||||||
# Install spaCy
|
# pyFlow
|
||||||
RUN pip3 install wheel && pip3 install -U spacy && \
|
ENV PYFLOW_VERSION=1.1.20
|
||||||
python3.5 -m spacy download de && \
|
ADD "https://github.com/Illumina/pyflow/releases/download/v${PYFLOW_VERSION}/pyflow-${PYFLOW_VERSION}.tar.gz" .
|
||||||
python3.5 -m spacy download en && \
|
RUN tar -xzf "pyflow-${PYFLOW_VERSION}.tar.gz" \
|
||||||
python3.5 -m spacy download es && \
|
&& cd "pyflow-${PYFLOW_VERSION}" \
|
||||||
python3.5 -m spacy download fr && \
|
&& python2.7 setup.py build install \
|
||||||
python3.5 -m spacy download it && \
|
&& cd .. \
|
||||||
python3.5 -m spacy download pt
|
&& rm -rf \
|
||||||
|
"pyflow-${PYFLOW_VERSION}" \
|
||||||
|
"pyflow-${PYFLOW_VERSION}.tar.gz"
|
||||||
|
|
||||||
|
# spaCy
|
||||||
|
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"
|
||||||
|
|
||||||
COPY nlp /usr/local/bin
|
COPY nlp /usr/local/bin
|
||||||
COPY spacy_nlp /usr/local/bin
|
COPY spacy_nlp /usr/local/bin
|
||||||
|
|
||||||
ENTRYPOINT ["nlp"]
|
ENTRYPOINT ["nlp"]
|
||||||
|
CMD ["--help"]
|
||||||
|
@ -5,7 +5,7 @@ import argparse
|
|||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
container_image = 'gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/nlp:latest'
|
container_image = 'gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/nlp:2.1.0'
|
||||||
container_input_dir = '/input'
|
container_input_dir = '/input'
|
||||||
container_output_dir = '/output'
|
container_output_dir = '/output'
|
||||||
uid = str(os.getuid())
|
uid = str(os.getuid())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user