From 89dd7205779a133e53e8892e840cd9cf0d1caa5e Mon Sep 17 00:00:00 2001 From: Birm Date: Sun, 10 Mar 2024 00:00:32 -0900 Subject: [PATCH] try to copy openslide so file as hotfix --- Dockerfile | 5 ++++- openslide_copy.sh | 13 +++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 openslide_copy.sh diff --git a/Dockerfile b/Dockerfile index ca9835a..d715468 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM camicroscope/image-decoders:latest +FROM camicroscope/image-decoders:1 WORKDIR /var/www RUN apt-get update @@ -30,6 +30,9 @@ ENV BFBRIDGE_LOGLEVEL=WARN RUN mkdir -p /images/uploading +COPY openslide_copy.sh . +RUN bash openslide_copy.sh + COPY requirements.txt . RUN pip3 install -r requirements.txt --break-system-packages diff --git a/openslide_copy.sh b/openslide_copy.sh new file mode 100644 index 0000000..afa93b9 --- /dev/null +++ b/openslide_copy.sh @@ -0,0 +1,13 @@ +lib_path=$(find /usr/local/lib/ -name 'libopenslide.so.1' -print -quit) + +# Check if libopenslide.so.1 is found +if [ -n "$lib_path" ]; then + # Navigate to the directory containing libopenslide.so.1 + cd "$(dirname "$lib_path")" + + # copy from libopenslide.so.1 to libopenslide.so.0, and /usr/local/lib directly + cp libopenslide.so.1 libopenslide.so.0 || true + cp libopenslide.so.1 /usr/local/lib/libopenslide.so.0 || true +else + echo "libopenslide.so.1 not found in /usr/local/lib/" +fi