Skip to content

Commit

Permalink
multiplatform build attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
birm committed Jan 29, 2024
1 parent d636b9c commit 5fa6ebe
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ WORKDIR /root/src/image-decoders
RUN chmod a+x install_openslide.sh
RUN ./install_openslide.sh

# temporary fix bc it's looking for .so.0 but has .so.1
WORKDIR /usr/local/lib
RUN ln -s $(ls | grep libopenslide.so.1) libopenslide.so.0
ENV LD_LIBRARY_PATH=/usr/local/lib

# temporary fix bc it's looking for .so.0 but has .so.1
RUN bash openslide_symlink.sh
## Install dummy apt packages against competitor versions being installed
WORKDIR /root/src/image-decoders
RUN chmod a+x register_openslide_apt.sh
Expand Down
3 changes: 3 additions & 0 deletions build_multiplatform.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
docker buildx create --use
docker buildx build --platform linux/amd64,linux/arm64 -t camicroscope/image_decoders -f Dockerfile .
docker push camicroscope/image_decoders
12 changes: 12 additions & 0 deletions openslide_symlink.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
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")"

# Create a symbolic link from libopenslide.so.1 to libopenslide.so.0
ln -s libopenslide.so.1 libopenslide.so.0
else
echo "libopenslide.so.1 not found in /usr/local/lib/"
fi
2 changes: 2 additions & 0 deletions register_openslide_apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ sed -i 's/libopenslide0/libopenslide-dev/g' libopenslide0
mv libopenslide0 libopenslide-dev
equivs-build libopenslide-dev
dpkg -i libopenslide-dev_4.1.0_all.deb

export LD_LIBRARY_PATH=/usr/local/lib

0 comments on commit 5fa6ebe

Please sign in to comment.