From 9680dd8299f213ea1b29c64ad7b72f6c05cbed1f Mon Sep 17 00:00:00 2001 From: "Gerber, Mike" Date: Fri, 14 Aug 2020 17:17:25 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9A=99=EF=B8=8F=20Install=20pip=20via=20get-?= =?UTF-8?q?pip.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile-boxed-base | 20 ++++++++++++++------ Dockerfile-boxed-ocrd_olena | 3 +-- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Dockerfile-boxed-base b/Dockerfile-boxed-base index 3fad690..2b3c8c6 100644 --- a/Dockerfile-boxed-base +++ b/Dockerfile-boxed-base @@ -8,7 +8,9 @@ RUN echo "APT::Acquire::Retries \"3\";" > /etc/apt/apt.conf.d/80-retries && \ apt-get update && \ apt-get install -y \ curl xz-utils \ - python3-pip \ + build-essential python3-dev \ +# For get-pip.py: + python3-distutils \ # For add-apt-repository: software-properties-common \ # XML utils @@ -23,11 +25,17 @@ RUN echo "APT::Acquire::Retries \"3\";" > /etc/apt/apt.conf.d/80-retries && \ COPY ocrd_logging.py /etc/ -# Build pip installable stuff -RUN pip3 install --no-cache-dir --upgrade pip && \ - pip3 install --no-cache-dir \ -# Resolve conflicts early: - 'setuptools >= 41.0.0' \ +# Install pip (and setuptools) +# We use get-pip.py here to avoid +# a. having to upgrade from Ubuntu's pip +# b. the dreaded "old script wrapper" error message +RUN curl -sSL https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ + python3 get-pip.py && \ + rm -f get-pip.py + + +# Install pip installable-stuff +RUN pip3 install --no-cache-dir \ 'ocrd >= 2.13.1' diff --git a/Dockerfile-boxed-ocrd_olena b/Dockerfile-boxed-ocrd_olena index 98f36bf..09675a6 100644 --- a/Dockerfile-boxed-ocrd_olena +++ b/Dockerfile-boxed-ocrd_olena @@ -14,8 +14,7 @@ RUN curl -sSL --retry 3 -O https://qurator-data.de/~mike.gerber/olena_2.1-0+ocrd apt-get update && \ apt-get -f install -y && \ apt-get clean && rm -rf /var/lib/apt/lists/* -RUN pip3 install --no-cache-dir --upgrade pip && \ - curl -sSL --retry 3 -o ocrd_olena.tar.gz https://github.com/OCR-D/ocrd_olena/archive/v${OCRD_OLENA_VERSION}.tar.gz && \ +RUN curl -sSL --retry 3 -o ocrd_olena.tar.gz https://github.com/OCR-D/ocrd_olena/archive/v${OCRD_OLENA_VERSION}.tar.gz && \ mkdir ocrd_olena && \ tar xvz -C ocrd_olena --strip-components=1 -f ocrd_olena.tar.gz && \ cd ocrd_olena && \