Skip to content

Commit

Permalink
Merge pull request #21 from camicroscope/develop
Browse files Browse the repository at this point in the history
For 3.11.0
  • Loading branch information
birm authored Nov 17, 2023
2 parents 030c8df + bade175 commit 10e6732
Show file tree
Hide file tree
Showing 19 changed files with 2,004 additions and 49 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,6 @@ Makefile.in
/ltmain.sh
/m4/
/missing

# BioFormats either copied by Docker of copied manually and locally
BFBridge/
32 changes: 4 additions & 28 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:focal
FROM camicroscope/image-decoders:latest

### update
ARG DEBIAN_FRONTEND=noninteractive
Expand All @@ -8,11 +8,10 @@ RUN apt-get -q -y dist-upgrade
RUN apt-get clean
RUN apt-get -q update

RUN apt-get -q -y install git autoconf automake make libtool pkg-config cmake apache2 libapache2-mod-fcgid libfcgi0ldbl zlib1g-dev libpng-dev libjpeg-dev libtiff5-dev libgdk-pixbuf2.0-dev libxml2-dev libsqlite3-dev libcairo2-dev libglib2.0-dev g++ libmemcached-dev libjpeg-turbo8-dev
RUN apt-get -q -y install git autoconf automake make libtool pkg-config apache2 libapache2-mod-fcgid libfcgi0ldbl g++ libmemcached-dev libjpeg-turbo8-dev
RUN a2enmod rewrite
RUN a2enmod fcgid

RUN mkdir /root/src
COPY . /root/src
WORKDIR /root/src

Expand All @@ -29,31 +28,8 @@ RUN ln -s /etc/apache2/mods-available/proxy.conf /etc/apache2/mods-enabled/proxy
COPY apache2.conf /etc/apache2/apache2.conf
COPY ports.conf /etc/apache2/ports.conf

WORKDIR /root/src

### openjpeg version in ubuntu 14.04 is 1.3, too old and does not have openslide required chroma subsampled images support. download 2.1.0 from source and build
RUN git clone https://github.com/uclouvain/openjpeg.git --branch=v2.3.0
RUN mkdir /root/src/openjpeg/build
WORKDIR /root/src/openjpeg/build
RUN cmake -DBUILD_JPIP=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_CODEC=ON -DBUILD_PKGCONFIG_FILES=ON ../
RUN make
RUN make install

### Openslide
WORKDIR /root/src
## get my fork from openslide source cdoe
RUN git clone https://github.com/openslide/openslide.git

## build openslide
WORKDIR /root/src/openslide
RUN git checkout tags/v3.4.1
RUN autoreconf -i
#RUN ./configure --enable-static --enable-shared=no
# may need to set OPENJPEG_CFLAGS='-I/usr/local/include' and OPENJPEG_LIBS='-L/usr/local/lib -lopenjp2'
# and the corresponding TIFF flags and libs to where bigtiff lib is installed.
RUN ./configure
RUN make
RUN make install
## Print BioFormats errors, etc. to Docker console (stderr)
#RUN ln -sf /proc/self/fd/1 /var/log/apache2/error.log

### iipsrv
WORKDIR /root/src/iipsrv
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2019, caMicroscope
Copyright (c) 2018-2023, caMicroscope
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Containerized IIP

## building and running

Unless using caMicroscope Distro Docker, [BFBridge](https://github.com/camicroscope/BFBridge) needs to be cloned and placed next to iipsrv/, so that this project's root iipimage/ has subfolders iipimage/ and BFBridge/

docker build . -t iipsrv

docker run iipsrv -d -p 4010:80
Expand Down
3 changes: 3 additions & 0 deletions apache2-iipsrv-fcgid.conf
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ FcgidInitialEnv MAX_CVT "5000"
#FcgidInitialEnv FILESYSTEM_PREFIX "/mnt/images/"
FcgidInitialEnv LD_LIBRARY_PATH "/usr/local/lib"
FcgidInitialEnv MAX_TILE_CACHE_SIZE "64"
FcgidInitialEnv BFBRIDGE_CACHEDIR "/tmp/"
FcgidInitialEnv BFBRIDGE_CLASSPATH "/usr/lib/java"
FcgidInitialEnv BFBRIDGE_LOGLEVEL "WARN"

# Define the idle timeout as unlimited and the number of
# processes we want
Expand Down
3 changes: 3 additions & 0 deletions fcgid.conf
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ FcgidInitialEnv MAX_CVT "5000"
FcgidInitialEnv LD_LIBRARY_PATH "/usr/local/lib"
FcgidInitialEnv MAX_TILE_CACHE_SIZE "64"
FcgidInitialEnv CORS "*"
FcgidInitialEnv BFBRIDGE_CACHEDIR "/tmp/"
FcgidInitialEnv BFBRIDGE_CLASSPATH "/usr/lib/java"
FcgidInitialEnv BFBRIDGE_LOGLEVEL "WARN"

# Define the idle timeout as unlimited and the number of
# processes we want
Expand Down
3 changes: 3 additions & 0 deletions iip_httpd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@ FastCgiServer /var/www/localhost/fcgi-bin/iipsrv.fcgi \
-initial-env JPEG_QUALITY=50 \
-initial-env MAX_CVT=3000 \
-initial-env CORS=* \
-initial-env BFBRIDGE_CACHEDIR=/tmp/ \
-initial-env BFBRIDGE_CLASSPATH=/usr/lib/java \
-initial-env BFBRIDGE_LOGLEVEL=WARN \
-listen-queue-depth 2048 \
-processes 1
Loading

0 comments on commit 10e6732

Please sign in to comment.