From c75c69cfd05a8be866ac9a3a58f3e07bc6f9cd32 Mon Sep 17 00:00:00 2001 From: Rob Court Date: Mon, 18 Nov 2019 16:01:34 +0000 Subject: [PATCH 01/32] Create dockerimage.yml --- .github/workflows/dockerimage.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/dockerimage.yml diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml new file mode 100644 index 0000000..37572da --- /dev/null +++ b/.github/workflows/dockerimage.yml @@ -0,0 +1,14 @@ +name: Docker Image CI + +on: [push] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: Build the Docker image + run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) From 3e395c5f29be90fb2cf828697617fe91cd57ac10 Mon Sep 17 00:00:00 2001 From: Rob Court Date: Tue, 21 Jan 2020 13:43:37 +0000 Subject: [PATCH 02/32] adding base36 --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index a35512b..1939066 100644 --- a/Dockerfile +++ b/Dockerfile @@ -173,6 +173,7 @@ RUN /root/anaconda3/bin/pip install requests RUN /root/anaconda3/bin/pip install psycopg2 RUN /root/anaconda3/bin/pip install pandas RUN /root/anaconda3/bin/pip install catpy +RUN /root/anaconda3/bin/pip install base36 COPY /scripts/* /scripts/ RUN chmod +x /scripts/*.sh From 98283889e7ceda8c14f08ac923a6c93b5e442edc Mon Sep 17 00:00:00 2001 From: Rob Court Date: Tue, 21 Jan 2020 16:39:45 +0000 Subject: [PATCH 03/32] adding requirements --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 1939066..2cbdfc6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -168,6 +168,7 @@ bash ${ANACONDAINS} -b RUN conda install python=3.7 anaconda=custom #neo4j requirements +RUN /root/anaconda3/bin/pip install -r /opt/VFB_neo4j/requirements.txt RUN /root/anaconda3/bin/pip install pynrrd RUN /root/anaconda3/bin/pip install requests RUN /root/anaconda3/bin/pip install psycopg2 From 5adc95bdb43dda082d9c25a1854e5b24591543d4 Mon Sep 17 00:00:00 2001 From: Rob Court Date: Fri, 24 Jan 2020 11:03:13 +0000 Subject: [PATCH 04/32] adding requirements in 3.7 --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 2cbdfc6..5e19065 100644 --- a/Dockerfile +++ b/Dockerfile @@ -175,6 +175,9 @@ RUN /root/anaconda3/bin/pip install psycopg2 RUN /root/anaconda3/bin/pip install pandas RUN /root/anaconda3/bin/pip install catpy RUN /root/anaconda3/bin/pip install base36 +RUN cd /opt && git clone https://github.com/VirtualFlyBrain/curation.git +RUN python3.7 -m pip install -r /opt/curation/requirements.txt +RUN python3.7 -m pip install -r /opt/VFB_neo4j/requirements.txt COPY /scripts/* /scripts/ RUN chmod +x /scripts/*.sh From bbc55e039befd16e4cc5c80ba2dbb386b2e1fde9 Mon Sep 17 00:00:00 2001 From: Rob Court Date: Fri, 24 Jan 2020 11:17:50 +0000 Subject: [PATCH 05/32] not needed --- Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5e19065..7096b9d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -165,8 +165,6 @@ RUN cd /tmp/ && \ wget https://repo.anaconda.com/archive/${ANACONDAINS} && \ bash ${ANACONDAINS} -b -RUN conda install python=3.7 anaconda=custom - #neo4j requirements RUN /root/anaconda3/bin/pip install -r /opt/VFB_neo4j/requirements.txt RUN /root/anaconda3/bin/pip install pynrrd From 8b28a7e16bfca79e50177baf1f4d2cf22d8c5295 Mon Sep 17 00:00:00 2001 From: Rob Court Date: Fri, 24 Jan 2020 12:47:21 +0000 Subject: [PATCH 06/32] reverting to working --- Dockerfile | 74 ++++++++---------------------------------------------- 1 file changed, 11 insertions(+), 63 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7096b9d..5b7b626 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ RUN pip install neo4j 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 ENV MA=/opt/MouseAtlas -RUN export PATH=/root/anaconda3/bin:/opt/VFB_neo4j/src:/opt/MouseAtlas/bin:$PATH +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 @@ -97,63 +97,9 @@ RUN cd /tmp/ \ && make \ && make install - -# RUN cd /opt/ \ -# && git clone https://github.com/Robbie1977/NRRDtools.git -# RUN cd /opt/ \ -# && git clone https://github.com/Robbie1977/SWCtools.git -# RUN cd /opt/ \ -# && git clone https://github.com/Robbie1977/Bound.git -# RUN cd /opt/ \ -# && git clone https://github.com/Robbie1977/3DwarpScoring.git -# RUN cd /opt/ \ -# && git clone https://github.com/Robbie1977/IndexStackConv.git -# RUN cd /opt/ \ -# && git clone https://github.com/Robbie1977/3DstackDisplay.git -# RUN cd /opt/ \ -# && git clone https://github.com/Robbie1977/lsm2nrrd.git -# RUN cd /opt/ \ -# && git clone https://github.com/Robbie1977/nrrd2raw.git RUN cd /opt/ \ && git clone https://github.com/VirtualFlyBrain/VFB_neo4j.git -# RUN cd /opt/ \ -# && git clone https://github.com/VirtualFlyBrain/StackProcessing.git -# RUN cd /opt/ \ -# && git clone https://github.com/VirtualFlyBrain/StackLoader.git -# RUN cd /opt/ \ -# && wget https://downloads.imagej.net/fiji/latest/fiji-linux64.zip \ -# && unzip fiji-linux64.zip \ -# && rm fiji-linux64.zip - -# 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 - - - -# RUN mkdir -p /disk/data/VFB/IMAGE_DATA/ -# RUN ln -s /opt/StackLoader /disk/data/VFB/IMAGE_DATA/ -# RUN mkdir -p /partition/bocian/VFBTools -# RUN ln -s /opt/* /partition/bocian/VFBTools/ -# RUN ln -s /VFB /disk/data/VFB/IMAGE_DATA/ -# RUN mkdir -p /disk/data/VFBTools -# RUN ln -s /opt/Fiji.app /disk/data/VFBTools/ -# RUN mv /disk/data/VFBTools/Fiji.app /disk/data/VFBTools/Fiji -# RUN ln -s /opt/* /disk/data/VFBTools/ -# RUN ln -s /disk/data/VFBTools/MouseAtlas /disk/data/VFBTools/Woolz2013Full -# RUN mkdir -p /partition/karenin/VFB/IMAGE_DATA/ -# RUN ln -s /opt/StackLoader /partition/karenin/VFB/IMAGE_DATA/ -# RUN ln -s /VFB /partition/karenin/VFB/IMAGE_DATA/ -# 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/ + ENV TZAREA=Europe ENV TZCITY=London @@ -166,14 +112,16 @@ wget https://repo.anaconda.com/archive/${ANACONDAINS} && \ bash ${ANACONDAINS} -b #neo4j requirements -RUN /root/anaconda3/bin/pip install -r /opt/VFB_neo4j/requirements.txt -RUN /root/anaconda3/bin/pip install pynrrd -RUN /root/anaconda3/bin/pip install requests -RUN /root/anaconda3/bin/pip install psycopg2 -RUN /root/anaconda3/bin/pip install pandas -RUN /root/anaconda3/bin/pip install catpy -RUN /root/anaconda3/bin/pip install base36 +RUN apt-get -y install ipython3 python3-pip python3-setuptools +RUN pip install psycopg2-binary +RUN pip install -r /opt/VFB_neo4j/requirements.txt +RUN pip3 install psycopg2-binary +RUN pip3 install -r /opt/VFB_neo4j/requirements.txt + RUN cd /opt && git clone https://github.com/VirtualFlyBrain/curation.git + +RUN python3.7 -m pip install --force-reinstall pip +RUN python3.7 -m pip install install psycopg2-binary RUN python3.7 -m pip install -r /opt/curation/requirements.txt RUN python3.7 -m pip install -r /opt/VFB_neo4j/requirements.txt From 756475991aa74f1248a037c66da0bbdb102b26dd Mon Sep 17 00:00:00 2001 From: Rob Court Date: Fri, 24 Jan 2020 12:54:15 +0000 Subject: [PATCH 07/32] using binary version --- Dockerfile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5b7b626..349b886 100644 --- a/Dockerfile +++ b/Dockerfile @@ -113,17 +113,18 @@ bash ${ANACONDAINS} -b #neo4j requirements RUN apt-get -y install ipython3 python3-pip python3-setuptools -RUN pip install psycopg2-binary -RUN pip install -r /opt/VFB_neo4j/requirements.txt -RUN pip3 install psycopg2-binary -RUN pip3 install -r /opt/VFB_neo4j/requirements.txt RUN cd /opt && git clone https://github.com/VirtualFlyBrain/curation.git +RUN sed 's/^psycopg2/psycopg2-binary/g' /opt/VFB_neo4j/requirements.txt >> /opt/requirements.txt +RUN sed 's/^psycopg2/psycopg2-binary/g' /opt/curation/requirements.txt >> /opt/requirements.txt + +RUN pip install -r /opt/requirements.txt +RUN pip3 install -r /opt/requirements.txt + RUN python3.7 -m pip install --force-reinstall pip -RUN python3.7 -m pip install install psycopg2-binary -RUN python3.7 -m pip install -r /opt/curation/requirements.txt -RUN python3.7 -m pip install -r /opt/VFB_neo4j/requirements.txt + +RUN python3.7 -m pip install -r /opt/requirements.txt COPY /scripts/* /scripts/ RUN chmod +x /scripts/*.sh From 3fe845a5f377419cbde090896c9c982e72af1a76 Mon Sep 17 00:00:00 2001 From: Rob Court Date: Fri, 24 Jan 2020 15:44:50 +0000 Subject: [PATCH 08/32] checking --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 349b886..9b50aab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -116,8 +116,8 @@ RUN apt-get -y install ipython3 python3-pip python3-setuptools RUN cd /opt && git clone https://github.com/VirtualFlyBrain/curation.git -RUN sed 's/^psycopg2/psycopg2-binary/g' /opt/VFB_neo4j/requirements.txt >> /opt/requirements.txt -RUN sed 's/^psycopg2/psycopg2-binary/g' /opt/curation/requirements.txt >> /opt/requirements.txt +RUN sed 's/^psycopg2$/psycopg2-binary/g' /opt/VFB_neo4j/requirements.txt >> /opt/requirements.txt +RUN sed 's/^psycopg2$/psycopg2-binary/g' /opt/curation/requirements.txt >> /opt/requirements.txt RUN pip install -r /opt/requirements.txt RUN pip3 install -r /opt/requirements.txt From 7cec7f3b78fb69bc2ec6a0babc3c359c53eaf50d Mon Sep 17 00:00:00 2001 From: Rob Court Date: Fri, 22 May 2020 09:05:02 +0100 Subject: [PATCH 09/32] fix to add universe repositories --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9b50aab..aaff24d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,10 @@ VOLUME template #cmtk 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 python3.7\ +&& apt-get -qq -y install software-properties-common \ +&& apt-add-repository -qq -y universe \ +&& 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 python3.7 \ && pip install --upgrade virtualenv \ && pip install --upgrade pip From fbd3bf08674ff9bc31f6b69420d9b004f4548250 Mon Sep 17 00:00:00 2001 From: Rob Court Date: Fri, 22 May 2020 09:26:53 +0100 Subject: [PATCH 10/32] typo fix --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index aaff24d..7b73999 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ VOLUME template #cmtk RUN apt-get -qq -y update \ && apt-get -qq -y install software-properties-common \ -&& apt-add-repository -qq -y universe \ +&& apt-add-repository universe \ && 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 python3.7 \ && pip install --upgrade virtualenv \ From 6a902958297aa01638f1055b0b69a9e783993b19 Mon Sep 17 00:00:00 2001 From: Rob Court Date: Fri, 22 May 2020 09:42:38 +0100 Subject: [PATCH 11/32] testing with xenial --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7b73999..1768138 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu +FROM ubuntu:xenial VOLUME input VOLUME output From aefdef47f50335b8a89f9152ba9d1f37761769b5 Mon Sep 17 00:00:00 2001 From: Rob Court Date: Fri, 22 May 2020 09:45:10 +0100 Subject: [PATCH 12/32] fixing to bionic --- Dockerfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1768138..c109938 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:xenial +FROM ubuntu:bionic VOLUME input VOLUME output @@ -6,9 +6,6 @@ VOLUME template #cmtk RUN apt-get -qq -y update \ -&& apt-get -qq -y install software-properties-common \ -&& apt-add-repository universe \ -&& 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 python3.7 \ && pip install --upgrade virtualenv \ && pip install --upgrade pip From e75dda6d1dc77ec755618a38456b4bca7d3576f4 Mon Sep 17 00:00:00 2001 From: Rob Court Date: Fri, 23 Apr 2021 09:24:46 +0100 Subject: [PATCH 13/32] limiting update to opt --- scripts/startup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/startup.sh b/scripts/startup.sh index e1f3c5f..5bc6921 100644 --- a/scripts/startup.sh +++ b/scripts/startup.sh @@ -1,5 +1,5 @@ #!/bin/bash -for folder in $(find / | grep '/\.git$') ; do git --git-dir=$folder pull || : ; done; +for folder in $(find /opt/ | grep '/\.git$') ; do git --git-dir=$folder pull || : ; done; /root/anaconda3/bin/jupyter lab --ip='*' --NotebookApp.password="${JUPYPASS}" --no-browser --port 80 --allow-root From 807f25890c95cfe034f332e51cd0439c8630042d Mon Sep 17 00:00:00 2001 From: Rob Court Date: Wed, 11 Aug 2021 12:24:52 +0100 Subject: [PATCH 14/32] installing 3.7 kernel --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index c109938..11f1c78 100644 --- a/Dockerfile +++ b/Dockerfile @@ -126,6 +126,10 @@ RUN python3.7 -m pip install --force-reinstall pip RUN python3.7 -m pip install -r /opt/requirements.txt +RUN python3.7 -m pip install ipykernel + +RUN python3.7 -m ipykernel install --prefix=/root/anaconda3/envs/ --name 'python3.7' + COPY /scripts/* /scripts/ RUN chmod +x /scripts/*.sh From ba4138c00cf99eaa78b02cf11e59d3ff880e0d0f Mon Sep 17 00:00:00 2001 From: Rob Court Date: Wed, 11 Aug 2021 12:45:55 +0100 Subject: [PATCH 15/32] moving to 3 --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 11f1c78..9d42c55 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,13 +11,13 @@ RUN apt-get -qq -y update \ && pip install --upgrade pip #python image support -RUN pip install pynrrd -RUN pip install h5py +RUN pip3 install pynrrd +RUN pip3 install h5py #python neo4j support -RUN pip install requests -RUN pip install psycopg2 -RUN pip install neo4j +RUN pip3 install requests +RUN pip3 install psycopg2 +RUN pip3 install neo4j #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 From 1eb2dbec09bbf32c55efd5d084a34fe2b2258c27 Mon Sep 17 00:00:00 2001 From: Rob Court Date: Wed, 11 Aug 2021 14:47:55 +0100 Subject: [PATCH 16/32] changing order --- Dockerfile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9d42c55..c62bd1a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,14 +10,7 @@ RUN apt-get -qq -y update \ && pip install --upgrade virtualenv \ && pip install --upgrade pip -#python image support -RUN pip3 install pynrrd -RUN pip3 install h5py -#python neo4j support -RUN pip3 install requests -RUN pip3 install psycopg2 -RUN pip3 install neo4j #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 @@ -114,6 +107,15 @@ bash ${ANACONDAINS} -b #neo4j requirements RUN apt-get -y install ipython3 python3-pip python3-setuptools +#python image support +RUN pip3 install pynrrd +RUN pip3 install h5py + +#python neo4j support +RUN pip3 install requests +RUN pip3 install psycopg2 +RUN pip3 install neo4j + RUN cd /opt && git clone https://github.com/VirtualFlyBrain/curation.git RUN sed 's/^psycopg2$/psycopg2-binary/g' /opt/VFB_neo4j/requirements.txt >> /opt/requirements.txt From b4175bef798033f757706648c70c81e24314fb7c Mon Sep 17 00:00:00 2001 From: Rob Court Date: Wed, 11 Aug 2021 15:41:26 +0100 Subject: [PATCH 17/32] reverting move --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index c62bd1a..c5080b2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,9 @@ RUN apt-get -qq -y update \ && pip install --upgrade virtualenv \ && pip install --upgrade pip +#python image support +RUN pip install pynrrd +RUN pip install h5py #woolz From d77d4a6690447195555433f0e586481da6f7c878 Mon Sep 17 00:00:00 2001 From: Rob Court Date: Wed, 11 Aug 2021 16:09:23 +0100 Subject: [PATCH 18/32] adding python-cjson --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c5080b2..53c3452 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ RUN pip install h5py #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 +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 python-cjson ENV MA=/opt/MouseAtlas ENV PATH=/opt/MouseAtlas/bin:$PATH From 31917f1cec7c1ed858df06897d85ba0a0730f31c Mon Sep 17 00:00:00 2001 From: Rob Court Date: Wed, 17 Jul 2024 16:14:50 +0100 Subject: [PATCH 19/32] Fix to ensure git pulls don't lockup loading --- scripts/startup.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/scripts/startup.sh b/scripts/startup.sh index 5bc6921..f8c6650 100644 --- a/scripts/startup.sh +++ b/scripts/startup.sh @@ -1,5 +1,19 @@ #!/bin/bash -for folder in $(find /opt/ | grep '/\.git$') ; do git --git-dir=$folder pull || : ; done; +TIMEOUT_DURATION=30 +DELAY_DURATION=50 + +# Function to perform git pulls with timeout and delay +perform_git_pulls() { + for folder in $(find / -type d -name ".git"); do + # Perform the git pull with a timeout + timeout $TIMEOUT_DURATION git --git-dir="$folder" pull || : + # Wait for the specified delay duration + sleep $DELAY_DURATION + done +} + +# Run the perform_git_pulls function as a subprocess +(perform_git_pulls &) /root/anaconda3/bin/jupyter lab --ip='*' --NotebookApp.password="${JUPYPASS}" --no-browser --port 80 --allow-root From b78500b4b6cae668c536edcd8938d8a2aecdc78e Mon Sep 17 00:00:00 2001 From: Rob Court Date: Thu, 8 Aug 2024 10:19:44 +0100 Subject: [PATCH 20/32] Update startup.sh --- scripts/startup.sh | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/scripts/startup.sh b/scripts/startup.sh index f8c6650..1f9545b 100644 --- a/scripts/startup.sh +++ b/scripts/startup.sh @@ -1,19 +1,5 @@ #!/bin/bash -TIMEOUT_DURATION=30 -DELAY_DURATION=50 - -# Function to perform git pulls with timeout and delay -perform_git_pulls() { - for folder in $(find / -type d -name ".git"); do - # Perform the git pull with a timeout - timeout $TIMEOUT_DURATION git --git-dir="$folder" pull || : - # Wait for the specified delay duration - sleep $DELAY_DURATION - done -} - -# Run the perform_git_pulls function as a subprocess -(perform_git_pulls &) +for folder in $(find /opt/ | grep '/\.git$') ; do echo $folder; cd $folder/../; git pull || : ; cd ..; done; /root/anaconda3/bin/jupyter lab --ip='*' --NotebookApp.password="${JUPYPASS}" --no-browser --port 80 --allow-root From cb0f3a41cc2ad9467add30168b348aafc51dc015 Mon Sep 17 00:00:00 2001 From: Rob Court Date: Thu, 8 Aug 2024 10:36:17 +0100 Subject: [PATCH 21/32] adding README fix --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 53c3452..2cf1c0d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -83,6 +83,7 @@ RUN cd /tmp/External/ \ RUN cd /tmp/ \ && git clone https://github.com/ma-tech/Woolz.git \ && cd Woolz \ +&& cp -v Readme.md README \ && mkdir -p m4 \ && libtoolize \ && aclocal \ From 50724efa7ee135cf402028bdd19b2231f7a094f8 Mon Sep 17 00:00:00 2001 From: Rob Court Date: Thu, 8 Aug 2024 11:01:26 +0100 Subject: [PATCH 22/32] installing cJSON explicitly --- Dockerfile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Dockerfile b/Dockerfile index 2cf1c0d..4022732 100644 --- a/Dockerfile +++ b/Dockerfile @@ -80,6 +80,16 @@ RUN cd /tmp/External/ \ && make \ && make install +# Install cJSON library +RUN cd /tmp/ \ + && git clone https://github.com/DaveGamble/cJSON.git \ + && cd cJSON \ + && mkdir build \ + && cd build \ + && cmake .. \ + && make \ + && make install + RUN cd /tmp/ \ && git clone https://github.com/ma-tech/Woolz.git \ && cd Woolz \ From 1b6df99278bac408381a55af0c7b1fb66205c92b Mon Sep 17 00:00:00 2001 From: Rob Court Date: Thu, 8 Aug 2024 11:13:19 +0100 Subject: [PATCH 23/32] pointing to cjson --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4022732..c1184f6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -100,7 +100,7 @@ RUN cd /tmp/ \ && automake --add-missing \ && autoreconf -i --force \ && ./build.sh \ -&& ./configure --prefix=$MA --enable-optimise --enable-extff --with-jpeg=$MA --with-tiff=$MA --with-nifti=/usr/local/ \ +&& ./configure --prefix=$MA --enable-optimise --enable-extff --with-jpeg=$MA --with-tiff=$MA --with-nifti=/usr/local/ --with-cjson=/usr/local \ && make \ && make install From fe2fd2779740b6cfee7667f52e5d2965d07839fc Mon Sep 17 00:00:00 2001 From: Rob Court Date: Thu, 8 Aug 2024 12:16:45 +0100 Subject: [PATCH 24/32] syntax fix --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c1184f6..7297de3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -100,7 +100,7 @@ RUN cd /tmp/ \ && automake --add-missing \ && autoreconf -i --force \ && ./build.sh \ -&& ./configure --prefix=$MA --enable-optimise --enable-extff --with-jpeg=$MA --with-tiff=$MA --with-nifti=/usr/local/ --with-cjson=/usr/local \ +&& CFLAGS="-I/usr/local/include" ./configure --prefix=$MA --enable-optimise --enable-extff --with-jpeg=$MA --with-tiff=$MA --with-nifti=/usr/local/ \ && make \ && make install From 361c9c57419c2a78d3e8ca3c886adc689a4a1f2d Mon Sep 17 00:00:00 2001 From: Rob Court Date: Thu, 8 Aug 2024 12:28:30 +0100 Subject: [PATCH 25/32] Revert "syntax fix" This reverts commit fe2fd2779740b6cfee7667f52e5d2965d07839fc. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7297de3..c1184f6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -100,7 +100,7 @@ RUN cd /tmp/ \ && automake --add-missing \ && autoreconf -i --force \ && ./build.sh \ -&& CFLAGS="-I/usr/local/include" ./configure --prefix=$MA --enable-optimise --enable-extff --with-jpeg=$MA --with-tiff=$MA --with-nifti=/usr/local/ \ +&& ./configure --prefix=$MA --enable-optimise --enable-extff --with-jpeg=$MA --with-tiff=$MA --with-nifti=/usr/local/ --with-cjson=/usr/local \ && make \ && make install From deb1462d75ad82025c69216c37fb16e9f8783a32 Mon Sep 17 00:00:00 2001 From: Rob Court Date: Thu, 8 Aug 2024 12:28:34 +0100 Subject: [PATCH 26/32] Revert "pointing to cjson" This reverts commit 1b6df99278bac408381a55af0c7b1fb66205c92b. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c1184f6..4022732 100644 --- a/Dockerfile +++ b/Dockerfile @@ -100,7 +100,7 @@ RUN cd /tmp/ \ && automake --add-missing \ && autoreconf -i --force \ && ./build.sh \ -&& ./configure --prefix=$MA --enable-optimise --enable-extff --with-jpeg=$MA --with-tiff=$MA --with-nifti=/usr/local/ --with-cjson=/usr/local \ +&& ./configure --prefix=$MA --enable-optimise --enable-extff --with-jpeg=$MA --with-tiff=$MA --with-nifti=/usr/local/ \ && make \ && make install From 10b34a796f1aec09545f8dcade3f7507be77f9c1 Mon Sep 17 00:00:00 2001 From: Rob Court Date: Thu, 8 Aug 2024 12:28:39 +0100 Subject: [PATCH 27/32] Revert "installing cJSON explicitly" This reverts commit 50724efa7ee135cf402028bdd19b2231f7a094f8. --- Dockerfile | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4022732..2cf1c0d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -80,16 +80,6 @@ RUN cd /tmp/External/ \ && make \ && make install -# Install cJSON library -RUN cd /tmp/ \ - && git clone https://github.com/DaveGamble/cJSON.git \ - && cd cJSON \ - && mkdir build \ - && cd build \ - && cmake .. \ - && make \ - && make install - RUN cd /tmp/ \ && git clone https://github.com/ma-tech/Woolz.git \ && cd Woolz \ From 1b2558446f2eda4fad83dbd1cf9f0446ee3cd262 Mon Sep 17 00:00:00 2001 From: Rob Court Date: Wed, 30 Oct 2024 14:48:17 +0000 Subject: [PATCH 28/32] swapping to python 3.10 --- Dockerfile | 194 ++++++++++++++++++++--------------------------------- 1 file changed, 73 insertions(+), 121 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2cf1c0d..41548a0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,144 +1,96 @@ FROM ubuntu:bionic - VOLUME input VOLUME output VOLUME template -#cmtk -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 python3.7 \ -&& pip install --upgrade virtualenv \ -&& pip install --upgrade pip - -#python image support -RUN pip install pynrrd -RUN pip install h5py - - -#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 python-cjson - +# Install base dependencies +RUN apt-get -qq -y update \ + && apt-get -qq -y install software-properties-common \ + && add-apt-repository ppa:deadsnakes/ppa \ + && apt-get -qq -y update \ + && apt-get -qq -y install \ + locales \ + cmtk \ + build-essential \ + git \ + nano \ + autoconf \ + nasm \ + zip \ + automake \ + m4 \ + libtool \ + bison \ + cmake \ + flex \ + xvfb \ + imagej \ + bc \ + sec \ + libpq-dev \ + python3.10 \ + python3.10-dev \ + python3.10-distutils \ + python3-pip + +# Set Python 3.10 as default +RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 \ + && update-alternatives --set python3 /usr/bin/python3.10 + +# Install pip for Python 3.10 +RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10 + +# Python image support +RUN python3.10 -m pip install pynrrd h5py + +# Rest of the original dependencies remain same +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 python-cjson + +# Environment variables 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 +# Woolz and dependencies installation (same as original) RUN cd /tmp/ \ -&& git clone https://github.com/ma-tech/External.git - -RUN cd /tmp/External/ \ -&& cd Fcgi/ \ -&& tar -zxf fcgi-2.4.0.tar.gz \ -&& patch -p0 < fcgi-2.4.0-patch-01 \ -&& cd fcgi-2.4.0 \ -&& ./configure --prefix=$MA --enable-static --disable-shared \ -&& make \ -&& make install - -RUN cd /tmp/External/ \ -&& cd Log4Cpp \ -&& rm -rf log4cpp-1.0 \ -&& tar -zxf log4cpp-1.0.tar.gz \ -&& patch -p0 < log4cpp-1.0.patch \ -&& cd log4cpp-1.0 \ -&& ./configure --prefix $MA --disable-shared --enable-static --with-pic \ -&& make \ -&& make install - -RUN cd /tmp/External/ \ -&& cd PNG \ -&& rm -rf libpng-1.6.29 \ -&& tar -zxf libpng-1.6.29.tar.gz \ -&& cd libpng-1.6.29 \ -&& ./configure --prefix $MA --disable-shared --enable-static --with-pic \ -&& make \ -&& make install - -RUN cd /tmp/External/ \ -&& cd Jpeg \ -&& rm -rf libjpeg-turbo-1.5.1 \ -&& tar -zxf libjpeg-turbo-1.5.1.tar.gz \ -&& cd libjpeg-turbo-1.5.1 \ -&& autoreconf -fi \ -&& ./configure --prefix $MA --disable-shared --enable-static --with-jpeg7 --with-pic \ -&& make \ -&& make install - -RUN cd /tmp/External/ \ -&& cd Tiff \ -&& rm -rf tiff-4.0.8 \ -&& tar -zxf tiff-4.0.8.tar.gz \ -&& cd tiff-4.0.8 \ -&& ./configure --prefix=$MA --disable-shared --enable-static --with-pic --with-jpeg-include-dir=$MA/include --with-jpeg-lib-dir==$MA/lib \ -&& make \ -&& make install - -RUN cd /tmp/External/ \ -&& cd NIfTI \ -&& tar -zxf nifticlib-2.0.0.tar.gz \ -&& cmake nifticlib-2.0.0 \ -&& make \ -&& make install - -RUN cd /tmp/ \ -&& git clone https://github.com/ma-tech/Woolz.git \ -&& cd Woolz \ -&& cp -v Readme.md README \ -&& mkdir -p m4 \ -&& libtoolize \ -&& aclocal \ -&& automake --add-missing \ -&& autoreconf -i --force \ -&& ./build.sh \ -&& ./configure --prefix=$MA --enable-optimise --enable-extff --with-jpeg=$MA --with-tiff=$MA --with-nifti=/usr/local/ \ -&& make \ -&& make install - -RUN cd /opt/ \ -&& git clone https://github.com/VirtualFlyBrain/VFB_neo4j.git + && git clone https://github.com/ma-tech/External.git +# [Previous Woolz-related RUN commands remain the same] +# Install Anaconda and set up Jupyter ENV TZAREA=Europe ENV TZCITY=London -ENV ANACONDAINS=Anaconda3-5.2.0-Linux-x86_64.sh +ENV ANACONDAINS=Anaconda3-2023.09-0-Linux-x86_64.sh ENV JUPYPASS="sha1:7f8e745dd219:b14fb15e0b4bc290a5d109ae97cba5c361b5d139" -#ipython jupyter notebook -RUN cd /tmp/ && \ -wget https://repo.anaconda.com/archive/${ANACONDAINS} && \ -bash ${ANACONDAINS} -b - -#neo4j requirements -RUN apt-get -y install ipython3 python3-pip python3-setuptools - -#python image support -RUN pip3 install pynrrd -RUN pip3 install h5py - -#python neo4j support -RUN pip3 install requests -RUN pip3 install psycopg2 -RUN pip3 install neo4j - -RUN cd /opt && git clone https://github.com/VirtualFlyBrain/curation.git - -RUN sed 's/^psycopg2$/psycopg2-binary/g' /opt/VFB_neo4j/requirements.txt >> /opt/requirements.txt -RUN sed 's/^psycopg2$/psycopg2-binary/g' /opt/curation/requirements.txt >> /opt/requirements.txt - -RUN pip install -r /opt/requirements.txt -RUN pip3 install -r /opt/requirements.txt - -RUN python3.7 -m pip install --force-reinstall pip - -RUN python3.7 -m pip install -r /opt/requirements.txt - -RUN python3.7 -m pip install ipykernel - -RUN python3.7 -m ipykernel install --prefix=/root/anaconda3/envs/ --name 'python3.7' +RUN cd /tmp/ \ + && wget https://repo.anaconda.com/archive/${ANACONDAINS} \ + && bash ${ANACONDAINS} -b + +# Install Python packages +RUN python3.10 -m pip install \ + requests \ + psycopg2-binary \ + neo4j \ + jupyter \ + ipykernel + +# Set up Python 3.10 kernel for Jupyter +RUN python3.10 -m ipykernel install --name 'python3.10' --display-name 'Python 3.10' + +# Clone repositories +RUN cd /opt \ + && git clone https://github.com/VirtualFlyBrain/VFB_neo4j.git \ + && git clone https://github.com/VirtualFlyBrain/curation.git + +# Install requirements +RUN sed 's/^psycopg2$/psycopg2-binary/g' /opt/VFB_neo4j/requirements.txt >> /opt/requirements.txt \ + && sed 's/^psycopg2$/psycopg2-binary/g' /opt/curation/requirements.txt >> /opt/requirements.txt \ + && python3.10 -m pip install -r /opt/requirements.txt COPY /scripts/* /scripts/ RUN chmod +x /scripts/*.sh ENTRYPOINT /scripts/startup.sh - EXPOSE 80 From c8dd5e4c6f5868c8ff2a987f122d531deae3780e Mon Sep 17 00:00:00 2001 From: Rob Court Date: Wed, 30 Oct 2024 14:56:36 +0000 Subject: [PATCH 29/32] base change --- Dockerfile | 118 ++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 99 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index 41548a0..1ddfaf4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,16 @@ -FROM ubuntu:bionic +FROM ubuntu:20.04 + +ENV DEBIAN_FRONTEND=noninteractive VOLUME input VOLUME output VOLUME template # Install base dependencies -RUN apt-get -qq -y update \ - && apt-get -qq -y install software-properties-common \ - && add-apt-repository ppa:deadsnakes/ppa \ - && apt-get -qq -y update \ - && apt-get -qq -y install \ +RUN apt-get update && apt-get install -y \ + software-properties-common \ + && add-apt-repository -y ppa:deadsnakes/ppa \ + && apt-get update \ + && apt-get install -y \ locales \ cmtk \ build-essential \ @@ -31,7 +33,20 @@ RUN apt-get -qq -y update \ python3.10 \ python3.10-dev \ python3.10-distutils \ - python3-pip + python3-pip \ + wget \ + curl \ + libdirectfb-dev \ + libjpeg-dev \ + zlib1g-dev \ + libsdl-gfx1.2-dev \ + libsdl1.2-dev \ + libasound2-dev \ + pkg-config \ + libpci-dev \ + dh-autoreconf \ + csh \ + && rm -rf /var/lib/apt/lists/* # Set Python 3.10 as default RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 \ @@ -43,27 +58,96 @@ RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10 # Python image support RUN python3.10 -m pip install pynrrd h5py -# Rest of the original dependencies remain same -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 python-cjson - # Environment variables 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 -# Woolz and dependencies installation (same as original) +# Woolz installation RUN cd /tmp/ \ && git clone https://github.com/ma-tech/External.git -# [Previous Woolz-related RUN commands remain the same] +RUN cd /tmp/External/ \ + && cd Fcgi/ \ + && tar -zxf fcgi-2.4.0.tar.gz \ + && patch -p0 < fcgi-2.4.0-patch-01 \ + && cd fcgi-2.4.0 \ + && ./configure --prefix=$MA --enable-static --disable-shared \ + && make \ + && make install + +RUN cd /tmp/External/ \ + && cd Log4Cpp \ + && rm -rf log4cpp-1.0 \ + && tar -zxf log4cpp-1.0.tar.gz \ + && patch -p0 < log4cpp-1.0.patch \ + && cd log4cpp-1.0 \ + && ./configure --prefix $MA --disable-shared --enable-static --with-pic \ + && make \ + && make install + +RUN cd /tmp/External/ \ + && cd PNG \ + && rm -rf libpng-1.6.29 \ + && tar -zxf libpng-1.6.29.tar.gz \ + && cd libpng-1.6.29 \ + && ./configure --prefix $MA --disable-shared --enable-static --with-pic \ + && make \ + && make install + +RUN cd /tmp/External/ \ + && cd Jpeg \ + && rm -rf libjpeg-turbo-1.5.1 \ + && tar -zxf libjpeg-turbo-1.5.1.tar.gz \ + && cd libjpeg-turbo-1.5.1 \ + && autoreconf -fi \ + && ./configure --prefix $MA --disable-shared --enable-static --with-jpeg7 --with-pic \ + && make \ + && make install + +RUN cd /tmp/External/ \ + && cd Tiff \ + && rm -rf tiff-4.0.8 \ + && tar -zxf tiff-4.0.8.tar.gz \ + && cd tiff-4.0.8 \ + && ./configure --prefix=$MA --disable-shared --enable-static --with-pic --with-jpeg-include-dir=$MA/include --with-jpeg-lib-dir==$MA/lib \ + && make \ + && make install + +RUN cd /tmp/External/ \ + && cd NIfTI \ + && tar -zxf nifticlib-2.0.0.tar.gz \ + && cmake nifticlib-2.0.0 \ + && make \ + && make install -# Install Anaconda and set up Jupyter +RUN cd /tmp/ \ + && git clone https://github.com/ma-tech/Woolz.git \ + && cd Woolz \ + && cp -v Readme.md README \ + && mkdir -p m4 \ + && libtoolize \ + && aclocal \ + && automake --add-missing \ + && autoreconf -i --force \ + && ./build.sh \ + && ./configure --prefix=$MA --enable-optimise --enable-extff --with-jpeg=$MA --with-tiff=$MA --with-nifti=/usr/local/ \ + && make \ + && make install + +# Clone VFB repositories +RUN cd /opt/ \ + && git clone https://github.com/VirtualFlyBrain/VFB_neo4j.git \ + && git clone https://github.com/VirtualFlyBrain/curation.git + +# Set environment variables ENV TZAREA=Europe ENV TZCITY=London ENV ANACONDAINS=Anaconda3-2023.09-0-Linux-x86_64.sh ENV JUPYPASS="sha1:7f8e745dd219:b14fb15e0b4bc290a5d109ae97cba5c361b5d139" +# Install Anaconda RUN cd /tmp/ \ && wget https://repo.anaconda.com/archive/${ANACONDAINS} \ && bash ${ANACONDAINS} -b @@ -79,16 +163,12 @@ RUN python3.10 -m pip install \ # Set up Python 3.10 kernel for Jupyter RUN python3.10 -m ipykernel install --name 'python3.10' --display-name 'Python 3.10' -# Clone repositories -RUN cd /opt \ - && git clone https://github.com/VirtualFlyBrain/VFB_neo4j.git \ - && git clone https://github.com/VirtualFlyBrain/curation.git - -# Install requirements +# Install requirements from VFB repositories RUN sed 's/^psycopg2$/psycopg2-binary/g' /opt/VFB_neo4j/requirements.txt >> /opt/requirements.txt \ && sed 's/^psycopg2$/psycopg2-binary/g' /opt/curation/requirements.txt >> /opt/requirements.txt \ && python3.10 -m pip install -r /opt/requirements.txt +# Copy and prepare scripts COPY /scripts/* /scripts/ RUN chmod +x /scripts/*.sh From 8f21d981b53532621bbb2b056f8200dfebd9fe16 Mon Sep 17 00:00:00 2001 From: Rob Court Date: Wed, 30 Oct 2024 15:40:55 +0000 Subject: [PATCH 30/32] Woolz fixes --- Dockerfile | 147 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 86 insertions(+), 61 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1ddfaf4..d340ac5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,77 +64,102 @@ 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 -# Woolz installation +# 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 + +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 +&& 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 \ - && patch -p0 < fcgi-2.4.0-patch-01 \ - && cd fcgi-2.4.0 \ - && ./configure --prefix=$MA --enable-static --disable-shared \ - && make \ - && make install - +&& cd Fcgi/ \ +&& tar -zxf fcgi-2.4.0.tar.gz \ +&& patch -p0 < fcgi-2.4.0-patch-01 \ +&& cd fcgi-2.4.0 \ +&& ./configure --prefix=$MA --enable-static --disable-shared \ +&& make \ +&& make install + +# Install Log4Cpp RUN cd /tmp/External/ \ - && cd Log4Cpp \ - && rm -rf log4cpp-1.0 \ - && tar -zxf log4cpp-1.0.tar.gz \ - && patch -p0 < log4cpp-1.0.patch \ - && cd log4cpp-1.0 \ - && ./configure --prefix $MA --disable-shared --enable-static --with-pic \ - && make \ - && make install - +&& cd Log4Cpp \ +&& rm -rf log4cpp-1.0 \ +&& tar -zxf log4cpp-1.0.tar.gz \ +&& patch -p0 < log4cpp-1.0.patch \ +&& cd log4cpp-1.0 \ +&& ./configure --prefix $MA --disable-shared --enable-static --with-pic \ +&& make \ +&& make install + +# Install PNG RUN cd /tmp/External/ \ - && cd PNG \ - && rm -rf libpng-1.6.29 \ - && tar -zxf libpng-1.6.29.tar.gz \ - && cd libpng-1.6.29 \ - && ./configure --prefix $MA --disable-shared --enable-static --with-pic \ - && make \ - && make install - +&& cd PNG \ +&& rm -rf libpng-1.6.29 \ +&& tar -zxf libpng-1.6.29.tar.gz \ +&& cd libpng-1.6.29 \ +&& ./configure --prefix $MA --disable-shared --enable-static --with-pic \ +&& make \ +&& make install + +# Install JPEG RUN cd /tmp/External/ \ - && cd Jpeg \ - && rm -rf libjpeg-turbo-1.5.1 \ - && tar -zxf libjpeg-turbo-1.5.1.tar.gz \ - && cd libjpeg-turbo-1.5.1 \ - && autoreconf -fi \ - && ./configure --prefix $MA --disable-shared --enable-static --with-jpeg7 --with-pic \ - && make \ - && make install - +&& cd Jpeg \ +&& rm -rf libjpeg-turbo-1.5.1 \ +&& tar -zxf libjpeg-turbo-1.5.1.tar.gz \ +&& cd libjpeg-turbo-1.5.1 \ +&& autoreconf -fi \ +&& ./configure --prefix $MA --disable-shared --enable-static --with-jpeg7 --with-pic \ +&& make \ +&& make install + +# Install Tiff RUN cd /tmp/External/ \ - && cd Tiff \ - && rm -rf tiff-4.0.8 \ - && tar -zxf tiff-4.0.8.tar.gz \ - && cd tiff-4.0.8 \ - && ./configure --prefix=$MA --disable-shared --enable-static --with-pic --with-jpeg-include-dir=$MA/include --with-jpeg-lib-dir==$MA/lib \ - && make \ - && make install - +&& cd Tiff \ +&& rm -rf tiff-4.0.8 \ +&& tar -zxf tiff-4.0.8.tar.gz \ +&& cd tiff-4.0.8 \ +&& ./configure --prefix=$MA --disable-shared --enable-static --with-pic --with-jpeg-include-dir=$MA/include --with-jpeg-lib-dir=$MA/lib \ +&& make \ +&& make install + +# Install NIfTI RUN cd /tmp/External/ \ - && cd NIfTI \ - && tar -zxf nifticlib-2.0.0.tar.gz \ - && cmake nifticlib-2.0.0 \ - && make \ - && make install +&& cd NIfTI \ +&& tar -zxf nifticlib-2.0.0.tar.gz \ +&& cmake nifticlib-2.0.0 \ +&& make \ +&& make install +# Install cJSON +RUN cd /tmp/ \ +&& git clone https://github.com/DaveGamble/cJSON.git \ +&& cd cJSON \ +&& mkdir build \ +&& cd build \ +&& cmake .. \ +&& make \ +&& make install + +# Woolz compilation RUN cd /tmp/ \ - && git clone https://github.com/ma-tech/Woolz.git \ - && cd Woolz \ - && cp -v Readme.md README \ - && mkdir -p m4 \ - && libtoolize \ - && aclocal \ - && automake --add-missing \ - && autoreconf -i --force \ - && ./build.sh \ - && ./configure --prefix=$MA --enable-optimise --enable-extff --with-jpeg=$MA --with-tiff=$MA --with-nifti=/usr/local/ \ - && make \ - && make install +&& git clone https://github.com/ma-tech/Woolz.git \ +&& cd Woolz \ +&& cp -v Readme.md README \ +&& mkdir -p m4 \ +&& libtoolize \ +&& aclocal \ +&& automake --add-missing \ +&& autoreconf -i --force \ +&& ./build.sh \ +&& ./configure --prefix=$MA --enable-optimise --enable-extff --with-jpeg=$MA --with-tiff=$MA --with-nifti=/usr/local/ CPPFLAGS="-I/usr/local/include/cjson" LDFLAGS="-L/usr/local/lib" \ +&& make \ +&& make install # Clone VFB repositories RUN cd /opt/ \ From 6dfb400653322ad0470ed3cf32b5af347e11097e Mon Sep 17 00:00:00 2001 From: Rob Court Date: Wed, 30 Oct 2024 15:59:13 +0000 Subject: [PATCH 31/32] Update startup.sh --- scripts/startup.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/startup.sh b/scripts/startup.sh index 1f9545b..9ada019 100644 --- a/scripts/startup.sh +++ b/scripts/startup.sh @@ -1,5 +1,10 @@ #!/bin/bash -for folder in $(find /opt/ | grep '/\.git$') ; do echo $folder; cd $folder/../; git pull || : ; cd ..; done; +/root/anaconda3/bin/jupyter lab --ip='*' --NotebookApp.password="${JUPYPASS}" --no-browser --port 80 --allow-root & -/root/anaconda3/bin/jupyter lab --ip='*' --NotebookApp.password="${JUPYPASS}" --no-browser --port 80 --allow-root +for folder in $(find /opt/ | grep '/\.git$') ; do echo $folder; cd $folder/../; git pull || : ; cd ..; sleep 10m; done; + +while true +do + sleep 999m +done From afe0b2cd63b6388036ef16fdfc8cf0a44b4b6f97 Mon Sep 17 00:00:00 2001 From: Rob Court Date: Wed, 30 Oct 2024 16:18:26 +0000 Subject: [PATCH 32/32] Update dockerimage.yml --- .github/workflows/dockerimage.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml index 37572da..5d2092f 100644 --- a/.github/workflows/dockerimage.yml +++ b/.github/workflows/dockerimage.yml @@ -11,4 +11,11 @@ jobs: steps: - uses: actions/checkout@v1 - name: Build the Docker image - run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) + run: docker build . --file Dockerfile --tag loadedubuntu:${GITHUB_REF#refs/heads/} + - name: Dockerize + if: success() + uses: manusa/actions-publish-docker@v1.1.2 + with: + name: rcourt/loadedubuntu + username: ${{ secrets.DOCKER_HUB_USER }} + password: ${{ secrets.DOCKER_HUB_PASSWORD }}