From f841f7cc2824bb51f76c7ea5107d28912ebc1b24 Mon Sep 17 00:00:00 2001 From: neobooru <50623835+neobooru@users.noreply.github.com> Date: Tue, 25 Feb 2025 22:46:12 +0100 Subject: [PATCH 1/2] deps: pin heif-image-plugin to version 0.5.1 Not sure if this really matters, but it fixes a pip warning. https://github.com/uploadcare/heif-image-plugin/commit/cc55068d163d1139e142d021f6c820f88dfef63a --- server/Dockerfile | 2 +- server/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index 3e4dadfb..8d5336e1 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -28,7 +28,7 @@ RUN pip3 install --no-cache-dir --disable-pip-version-check \ "alembic>=0.8.5" \ "coloredlogs==5.0" \ "pyheif==0.6.1" \ - "heif-image-plugin>=0.3.2" \ + "heif-image-plugin==0.5.1" \ yt-dlp \ "pillow-avif-plugin~=1.1.0" RUN apk --no-cache del py3-pip diff --git a/server/requirements.txt b/server/requirements.txt index ffe18f0c..989cb5c9 100644 --- a/server/requirements.txt +++ b/server/requirements.txt @@ -1,7 +1,7 @@ alembic>=0.8.5 certifi>=2017.11.5 coloredlogs==5.0 -heif-image-plugin==0.3.2 +heif-image-plugin==0.5.1 numpy>=1.8.2 pillow-avif-plugin~=1.1.0 pillow>=4.3.0 From 01c779314ea78c012aabe2d2f48365830ed67de3 Mon Sep 17 00:00:00 2001 From: neobooru <50623835+neobooru@users.noreply.github.com> Date: Sat, 1 Mar 2025 01:14:39 +0100 Subject: [PATCH 2/2] server/deps: remove pillow-avif-plugin package --- server/Dockerfile | 5 +---- server/requirements.txt | 1 - server/szurubooru/func/image_hash.py | 1 - server/szurubooru/func/images.py | 1 - 4 files changed, 1 insertion(+), 7 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index 8d5336e1..66e8fbb7 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -11,8 +11,6 @@ RUN apk --no-cache add \ build-base \ libheif \ libheif-dev \ - libavif \ - libavif-dev \ ffmpeg \ # from requirements.txt: py3-yaml \ @@ -29,8 +27,7 @@ RUN pip3 install --no-cache-dir --disable-pip-version-check \ "coloredlogs==5.0" \ "pyheif==0.6.1" \ "heif-image-plugin==0.5.1" \ - yt-dlp \ - "pillow-avif-plugin~=1.1.0" + yt-dlp RUN apk --no-cache del py3-pip COPY ./ /opt/app/ diff --git a/server/requirements.txt b/server/requirements.txt index 989cb5c9..3ff12939 100644 --- a/server/requirements.txt +++ b/server/requirements.txt @@ -3,7 +3,6 @@ certifi>=2017.11.5 coloredlogs==5.0 heif-image-plugin==0.5.1 numpy>=1.8.2 -pillow-avif-plugin~=1.1.0 pillow>=4.3.0 psycopg2-binary>=2.6.1 pyheif==0.6.1 diff --git a/server/szurubooru/func/image_hash.py b/server/szurubooru/func/image_hash.py index 76d5a846..73698aa9 100644 --- a/server/szurubooru/func/image_hash.py +++ b/server/szurubooru/func/image_hash.py @@ -6,7 +6,6 @@ from typing import Any, Callable, List, Optional, Set, Tuple import HeifImagePlugin import numpy as np -import pillow_avif from PIL import Image from szurubooru import config, errors diff --git a/server/szurubooru/func/images.py b/server/szurubooru/func/images.py index e135d182..41f0356c 100644 --- a/server/szurubooru/func/images.py +++ b/server/szurubooru/func/images.py @@ -8,7 +8,6 @@ from io import BytesIO from typing import List import HeifImagePlugin -import pillow_avif from PIL import Image as PILImage from szurubooru import errors