From 2d5fd0c120d43a9d6459cb3e46b52f02e895b0ca Mon Sep 17 00:00:00 2001 From: Rob Court Date: Thu, 17 Oct 2024 17:40:58 +0100 Subject: [PATCH] fix for cJSON.h --- Dockerfile | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index c960dd4..57786f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,34 +4,46 @@ VOLUME input VOLUME output VOLUME template -#cmtk +# Base dependencies RUN apt-get -qq -y update \ && apt-get -qq -y install locales cmtk python python-pip python-dev ipython build-essential git nano autoconf nasm zip automake autoconf m4 libtool bison cmake flex xvfb imagej bc sec libpq-dev maven python3 python3-pip \ && pip install --upgrade virtualenv \ && pip install --upgrade pip -#python image support +# Python image support RUN pip install pynrrd RUN pip install h5py RUN pip3 install pynrrd h5py requests psycopg2 neo4j==1.7.6 -#python neo4j support +# Python neo4j support RUN pip install requests RUN pip install psycopg2 RUN pip install neo4j==1.7.6 -#woolz -RUN apt-get -y install build-essential gcc make wget libdirectfb-dev libjpeg-dev zlib1g-dev libsdl-gfx1.2-dev gcc libsdl1.2-dev libasound2-dev pkg-config libpci-dev dh-autoreconf csh +# Woolz dependencies +RUN apt-get -y install build-essential gcc make wget libdirectfb-dev libjpeg-dev zlib1g-dev libsdl-gfx1.2-dev gcc libsdl1.2-dev libasound2-dev pkg-config libpci-dev dh-autoreconf csh + +# Install cJSON +RUN cd /tmp/ \ +&& git clone https://github.com/DaveGamble/cJSON.git \ +&& cd cJSON \ +&& mkdir build \ +&& cd build \ +&& cmake .. \ +&& make \ +&& make install ENV MA=/opt/MouseAtlas ENV PATH=/opt/MouseAtlas/bin:$PATH ENV LD_LIBRARY_PATH=/opt/MouseAtlas/lib:$LD_LIBRARY_PATH ENV LD_RUN_PATH=/opt/MouseAtlas/lib:$LD_RUN_PATH +# External Dependencies RUN cd /tmp/ \ && git clone https://github.com/ma-tech/External.git +# Install Fcgi RUN cd /tmp/External/ \ && cd Fcgi/ \ && tar -zxf fcgi-2.4.0.tar.gz \ @@ -41,6 +53,7 @@ RUN cd /tmp/External/ \ && make \ && make install +# Install Log4Cpp RUN cd /tmp/External/ \ && cd Log4Cpp \ && rm -rf log4cpp-1.0 \ @@ -51,6 +64,7 @@ RUN cd /tmp/External/ \ && make \ && make install +# Install PNG RUN cd /tmp/External/ \ && cd PNG \ && rm -rf libpng-1.6.29 \ @@ -60,6 +74,7 @@ RUN cd /tmp/External/ \ && make \ && make install +# Install JPEG RUN cd /tmp/External/ \ && cd Jpeg \ && rm -rf libjpeg-turbo-1.5.1 \ @@ -70,6 +85,7 @@ RUN cd /tmp/External/ \ && make \ && make install +# Install Tiff RUN cd /tmp/External/ \ && cd Tiff \ && rm -rf tiff-4.0.8 \ @@ -79,6 +95,7 @@ RUN cd /tmp/External/ \ && make \ && make install +# Install NIfTI RUN cd /tmp/External/ \ && cd NIfTI \ && tar -zxf nifticlib-2.0.0.tar.gz \ @@ -86,6 +103,7 @@ RUN cd /tmp/External/ \ && make \ && make install +# Woolz compilation RUN cd /tmp/ \ && git clone https://github.com/ma-tech/Woolz.git \ && cd Woolz \ @@ -100,7 +118,7 @@ RUN cd /tmp/ \ && make \ && make install - +# Additional tools installation RUN cd /opt/ \ && git clone https://github.com/Robbie1977/NRRDtools.git RUN cd /opt/ \ @@ -132,15 +150,12 @@ ENV FIJI=/opt/Fiji.app/ImageJ-linux64 RUN mkdir -p /data/ && cd /data/ \ && git clone https://github.com/VirtualFlyBrain/DrosAdultVNSdomains.git - RUN cd /data/ \ && git clone https://github.com/VirtualFlyBrain/DrosAdultBRAINdomains.git - RUN cd /data/ \ && git clone https://github.com/VirtualFlyBrain/DrosAdultHalfBRAINdomains.git - - +# Various symlinks RUN mkdir -p /disk/data/VFB/IMAGE_DATA/ RUN ln -s /opt/StackLoader /disk/data/VFB/IMAGE_DATA/ RUN mkdir -p /partition/bocian/VFBTools @@ -158,6 +173,7 @@ RUN mkdir -p /partition/bocian/VFBTools/python-modules-2.6/bin/ RUN echo "#empty" > /partition/bocian/VFBTools/python-modules-2.6/bin/activate RUN ln -s /opt/StackProcessing /disk/data/VFB/IMAGE_DATA/ +# Install JGO and other tools RUN cd /opt/ && \ git clone https://github.com/scijava/jgo && \ cd /bin && \ @@ -168,15 +184,18 @@ cd template-building && \ git checkout v0.1.0 && \ mvn -Dimagej.app.directory=$FIJI clean compile install +# Copy scripts and set permissions COPY /scripts/* /scripts/ RUN chmod +x /scripts/*.sh +# Environment variables for scripts ENV woolzDir=/usr/lib/cmtk/bin/ ENV dirName=/opt/StackLoader/PutAlignedFilesInHere/ ENV fijiBin=/opt/Fiji.app/ImageJ-linux64 ENV sriptDir=/opt/StackProcessing/scripts/ ENV imageDir=/IMAGE_DATA/VFB/i/ +# Install ImageMagick RUN cd /opt/ && \ wget https://www.imagemagick.org/archive/ImageMagick.tar.gz && \ tar xvzf ImageMagick.tar.gz && \ @@ -187,6 +206,8 @@ make install && \ ldconfig /usr/local/lib && \ magick -version +# Set the entry point ENTRYPOINT /scripts/startup.sh +# Expose port 80 EXPOSE 80