From b74fe751771e06a1bc3981c9410fa10566aa9889 Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Thu, 18 Jul 2024 16:01:15 -0700 Subject: [PATCH 1/2] WIP --- Dockerfile | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1993d9913..d3313728e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG HYRAX_IMAGE_VERSION=hyrax-v5.0.0.rc1 +ARG HYRAX_IMAGE_VERSION=hyrax-v5.0.1 FROM ghcr.io/samvera/hyrax/hyrax-base:$HYRAX_IMAGE_VERSION as hyku-base USER root @@ -29,36 +29,31 @@ RUN apk --no-cache upgrade && \ tesseract-ocr \ vim \ yarn \ - && \ - # curl https://sh.rustup.rs -sSf | sh -s -- -y && \ - # source "$HOME/.cargo/env" && \ - # cargo install rbspy && \ - echo "******** Packages Installed *********" + && echo "******** Packages Installed *********" +# Build and install ImageMagick RUN wget https://github.com/ImageMagick/ImageMagick/archive/refs/tags/7.1.0-57.tar.gz \ && tar xf 7.1.0-57.tar.gz \ - && apk --no-cache add \ - libjpeg-turbo openjpeg libpng tiff librsvg libgsf libimagequant poppler-qt5-dev \ - && cd ImageMagick* \ + && cd ImageMagick-7.1.0-57 \ && ./configure \ + && make \ && make install \ && cd $OLDPWD \ - && rm -rf ImageMagick* \ - && rm -rf /var/cache/apk/* + && rm -rf ImageMagick-7.1.0-57 \ + && rm -rf 7.1.0-57.tar.gz # Install "best" training data for Tesseract RUN echo "📚 Installing Tesseract Best (training data)!" && \ cd /usr/share/tessdata/ && \ - wget https://github.com/tesseract-ocr/tessdata_best/blob/main/eng.traineddata?raw=true -O eng_best.traineddata + wget https://github.com/tesseract-ocr/tessdata_best/raw/main/eng.traineddata -O eng_best.traineddata ARG VIPS_VERSION=8.11.3 RUN set -x -o pipefail \ && wget -O- https://github.com/libvips/libvips/releases/download/v${VIPS_VERSION}/vips-${VIPS_VERSION}.tar.gz | tar xzC /tmp \ && apk --no-cache add \ - libjpeg-turbo openjpeg libpng tiff librsvg libgsf libimagequant poppler-qt5-dev \ - && apk add --virtual vips-dependencies build-base \ libjpeg-turbo-dev libpng-dev tiff-dev librsvg-dev libgsf-dev libimagequant-dev \ + && apk add --virtual vips-dependencies build-base \ && cd /tmp/vips-${VIPS_VERSION} \ && ./configure --prefix=/usr \ --disable-static \ From 4094d05b227de3821eaf595da5277a0d39c025e1 Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Thu, 18 Jul 2024 16:36:59 -0700 Subject: [PATCH 2/2] Update dockerfile to support hyrax-v5.0.1 --- Dockerfile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d3313728e..d7280ca73 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,6 @@ RUN apk --no-cache upgrade && \ exiftool \ ffmpeg \ git \ - imagemagick \ less \ libreoffice \ libreoffice-lang-uk \ @@ -29,6 +28,17 @@ RUN apk --no-cache upgrade && \ tesseract-ocr \ vim \ yarn \ + build-base \ + imagemagick \ + imagemagick-dev \ + imagemagick-libs \ + imagemagick-heic \ + imagemagick-jpeg \ + imagemagick-jxl \ + imagemagick-pdf \ + imagemagick-svg \ + imagemagick-tiff \ + imagemagick-webp \ && echo "******** Packages Installed *********" # Build and install ImageMagick