mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nlp.git
synced 2025-01-13 19:40:34 +00:00
Use fix version numbers.
This commit is contained in:
parent
e68d5c39ee
commit
2f57b1a0af
65
Dockerfile
65
Dockerfile
@ -1,40 +1,55 @@
|
||||
FROM debian:9-slim
|
||||
|
||||
|
||||
LABEL maintainer="inf_sfb1288@lists.uni-bielefeld.de"
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV LANG=C.UTF-8
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
# Install prerequisites
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
python2.7 \
|
||||
python3.5 \
|
||||
python3-dev \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
wget
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& pip3 install \
|
||||
setuptools \
|
||||
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
|
||||
RUN pip3 install wheel && pip3 install -U spacy && \
|
||||
python3.5 -m spacy download de && \
|
||||
python3.5 -m spacy download en && \
|
||||
python3.5 -m spacy download es && \
|
||||
python3.5 -m spacy download fr && \
|
||||
python3.5 -m spacy download it && \
|
||||
python3.5 -m spacy download pt
|
||||
# pyFlow
|
||||
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"
|
||||
|
||||
# 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 spacy_nlp /usr/local/bin
|
||||
|
||||
ENTRYPOINT ["nlp"]
|
||||
CMD ["--help"]
|
||||
|
@ -5,7 +5,7 @@ import argparse
|
||||
import os
|
||||
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_output_dir = '/output'
|
||||
uid = str(os.getuid())
|
||||
|
Loading…
x
Reference in New Issue
Block a user