Install models via an alternative way.

This commit is contained in:
Patrick Jentsch 2019-09-12 09:56:13 +02:00
parent af293d6141
commit a16b010bdc
2 changed files with 17 additions and 17 deletions

View File

@ -26,25 +26,25 @@ RUN tar -xzf "pyflow-${PYFLOW_VERSION}.tar.gz" \
"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 \
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}" \
"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"
&& 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

View File

@ -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())