From c1e3fed5bcb0da4ae145887f71ec3c20b900ca64 Mon Sep 17 00:00:00 2001 From: Alessio Buccino Date: Mon, 21 Jul 2025 17:38:17 +0200 Subject: [PATCH 1/2] update docker images --- {klusta => archived/klusta}/Dockerfile | 0 {klusta => archived/klusta}/build.sh | 0 {klusta => archived/klusta}/push.sh | 0 {yass => archived/yass}/Dockerfile | 0 {yass => archived/yass}/build.sh | 0 {yass => archived/yass}/push.sh | 0 combinato/Dockerfile | 6 ++- combinato/build.sh | 2 +- hdsort-compiled/Dockerfile | 10 +++-- hdsort-compiled/build.sh | 2 +- hdsort-compiled/compile.sh | 3 +- ironclust-compiled/Dockerfile | 8 ++-- ironclust-compiled/build.sh | 2 +- ironclust-compiled/compile.sh | 1 + kilosort-compiled/compile_and_build_all_ks.sh | 2 + kilosort4/Dockerfile | 10 ++--- mountainsort4/Dockerfile | 7 +--- mountainsort5/Dockerfile | 6 +-- rtsort/Dockerfile | 39 +++++++++++++++++++ rtsort/build.sh | 3 ++ rtsort/push.sh | 3 ++ waveclus-compiled/Dockerfile | 11 ++++-- waveclus-compiled/build.sh | 2 +- waveclus-compiled/compile.sh | 5 ++- 24 files changed, 88 insertions(+), 34 deletions(-) rename {klusta => archived/klusta}/Dockerfile (100%) rename {klusta => archived/klusta}/build.sh (100%) rename {klusta => archived/klusta}/push.sh (100%) rename {yass => archived/yass}/Dockerfile (100%) rename {yass => archived/yass}/build.sh (100%) rename {yass => archived/yass}/push.sh (100%) create mode 100644 rtsort/Dockerfile create mode 100755 rtsort/build.sh create mode 100644 rtsort/push.sh diff --git a/klusta/Dockerfile b/archived/klusta/Dockerfile similarity index 100% rename from klusta/Dockerfile rename to archived/klusta/Dockerfile diff --git a/klusta/build.sh b/archived/klusta/build.sh similarity index 100% rename from klusta/build.sh rename to archived/klusta/build.sh diff --git a/klusta/push.sh b/archived/klusta/push.sh similarity index 100% rename from klusta/push.sh rename to archived/klusta/push.sh diff --git a/yass/Dockerfile b/archived/yass/Dockerfile similarity index 100% rename from yass/Dockerfile rename to archived/yass/Dockerfile diff --git a/yass/build.sh b/archived/yass/build.sh similarity index 100% rename from yass/build.sh rename to archived/yass/build.sh diff --git a/yass/push.sh b/archived/yass/push.sh similarity index 100% rename from yass/push.sh rename to archived/yass/push.sh diff --git a/combinato/Dockerfile b/combinato/Dockerfile index 501576d..4fe4215 100644 --- a/combinato/Dockerfile +++ b/combinato/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.8 +FROM python:3.12 LABEL maintainer="Vincent Prevosto " @@ -27,12 +27,14 @@ RUN git clone https://github.com/jniediek/combinato.git # Add Combinato repository to paths ENV COMBINATO_PATH=/src/combinato ENV PATH=$PATH:$COMBINATO_PATH -ENV PYTHONPATH=$PYTHONPATH:/usr/local/bin/python3:$COMBINATO_PATH +ENV PYTHONPATH=/usr/local/bin/python3:$COMBINATO_PATH RUN echo '\n\ export PATH=$PATH:/src/combinato\n\ export PYTHONPATH=$PYTHONPATH:/usr/local/bin/python3:/src/combinato\n\ export COMBINATO_PATH=/src/combinato' >> /root/.bashrc +RUN pip install "numpy<2" # Ensure compatibility with Combinato + # Install Combinato WORKDIR /src/combinato RUN python3 setup_options.py diff --git a/combinato/build.sh b/combinato/build.sh index 01e9aea..a071805 100755 --- a/combinato/build.sh +++ b/combinato/build.sh @@ -1,3 +1,3 @@ #!/bin/bash -docker build -t spikeinterface/combinato-base:latest -t spikeinterface/combinato-base:0.1.0 . +docker build -t spikeinterface/combinato-base:latest -t spikeinterface/combinato-base:0.2.0 . diff --git a/hdsort-compiled/Dockerfile b/hdsort-compiled/Dockerfile index bd77067..3a32192 100644 --- a/hdsort-compiled/Dockerfile +++ b/hdsort-compiled/Dockerfile @@ -1,5 +1,6 @@ FROM hdsort-matlab-base +USER root RUN chmod 755 /usr/bin/mlrtapp/hdsort_compiled ENV PATH="/usr/bin/mlrtapp:${PATH}" @@ -11,10 +12,11 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* -ENV MINICONDA_VERSION 4.8.2 -ENV CONDA_DIR /home/miniconda3 -ENV LATEST_CONDA_SCRIPT "Miniconda3-py38_$MINICONDA_VERSION-Linux-x86_64.sh" - +ENV MINICONDA_VERSION=25.5.1-0 +ENV PYTHON_VERSION=py312 +ENV CONDA_DIR=/home/miniconda3 +ENV LATEST_CONDA_SCRIPT="Miniconda3-${PYTHON_VERSION}_${MINICONDA_VERSION}-Linux-x86_64.sh" + RUN wget --quiet https://repo.anaconda.com/miniconda/$LATEST_CONDA_SCRIPT -O ~/miniconda.sh && \ bash ~/miniconda.sh -b -p $CONDA_DIR && \ rm ~/miniconda.sh diff --git a/hdsort-compiled/build.sh b/hdsort-compiled/build.sh index cb25fa2..5632000 100755 --- a/hdsort-compiled/build.sh +++ b/hdsort-compiled/build.sh @@ -1,4 +1,4 @@ #!/bin/bash -docker build -t spikeinterface/hdsort-compiled-base:latest -t spikeinterface/hdsort-compiled-base:0.1.0 . +docker build -t spikeinterface/hdsort-compiled-base:latest -t spikeinterface/hdsort-compiled-base:0.2.0 . diff --git a/hdsort-compiled/compile.sh b/hdsort-compiled/compile.sh index b6ceb78..e0f1a57 100755 --- a/hdsort-compiled/compile.sh +++ b/hdsort-compiled/compile.sh @@ -29,7 +29,8 @@ mkdir -p $TMP_DIR echo "Compiling hdsort..." cd $TMP_DIR -matlab -batch "mcc -m ${SI_PATH}/spikeinterface/sorters/hdsort/hdsort_master.m -a ${SI_PATH}/spikeinterface/sorters/utils -a ${HDSORT_PATH} -o ${HDSORT_COMPILED_NAME}" +EXTERNAL_SORTERS_FOLDER=${SI_PATH}/src/spikeinterface/sorters/external/ +matlab -batch "mcc -m ${EXTERNAL_SORTERS_FOLDER}/hdsort_master.m -a ${SI_PATH}/src/spikeinterface/sorters/utils -a ${HDSORT_PATH} -o ${HDSORT_COMPILED_NAME}" echo "Creating base docker image..." matlab -batch "compiler.package.docker('${HDSORT_COMPILED_NAME}', 'requiredMCRProducts.txt', 'ImageName', 'hdsort-matlab-base')" diff --git a/ironclust-compiled/Dockerfile b/ironclust-compiled/Dockerfile index 2085e33..a779433 100644 --- a/ironclust-compiled/Dockerfile +++ b/ironclust-compiled/Dockerfile @@ -1,5 +1,6 @@ FROM ironclust-matlab-base +USER root RUN chmod 755 /usr/bin/mlrtapp/p_ironclust ENV PATH="/usr/bin/mlrtapp:${PATH}" @@ -11,9 +12,10 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* -ENV MINICONDA_VERSION 4.8.2 -ENV CONDA_DIR /home/miniconda3 -ENV LATEST_CONDA_SCRIPT "Miniconda3-py38_$MINICONDA_VERSION-Linux-x86_64.sh" +ENV MINICONDA_VERSION=25.5.1-0 +ENV PYTHON_VERSION=py312 +ENV CONDA_DIR=/home/miniconda3 +ENV LATEST_CONDA_SCRIPT="Miniconda3-${PYTHON_VERSION}_${MINICONDA_VERSION}-Linux-x86_64.sh" RUN wget --quiet https://repo.anaconda.com/miniconda/$LATEST_CONDA_SCRIPT -O ~/miniconda.sh && \ bash ~/miniconda.sh -b -p $CONDA_DIR && \ diff --git a/ironclust-compiled/build.sh b/ironclust-compiled/build.sh index b307a48..f381652 100755 --- a/ironclust-compiled/build.sh +++ b/ironclust-compiled/build.sh @@ -1,4 +1,4 @@ #!/bin/bash -docker build -t spikeinterface/ironclust-compiled-base:latest -t spikeinterface/ironclust-compiled-base:5.9.8 . +docker build -t spikeinterface/ironclust-compiled-base:latest -t spikeinterface/ironclust-compiled-base:5.9.8_cuda-12.0.0 . diff --git a/ironclust-compiled/compile.sh b/ironclust-compiled/compile.sh index 38952ef..02e0376 100755 --- a/ironclust-compiled/compile.sh +++ b/ironclust-compiled/compile.sh @@ -39,6 +39,7 @@ for fname in $(eval "ls ${IC_PATH} -I \"*.pdf\" -p | grep -v /"); do done ADD_FILES="${ADD_FILES} -a ${IC_PATH}/prb" ADD_FILES="${ADD_FILES} -a ${IC_PATH}/prb_json" +ADD_FILES="${ADD_FILES} -a ${IC_PATH}/jsonlab-1.5" matlab -batch "mcc -m ${IC_PATH}/p_ironclust.m ${ADD_FILES} -o ${IC_COMPILED_NAME}" diff --git a/kilosort-compiled/compile_and_build_all_ks.sh b/kilosort-compiled/compile_and_build_all_ks.sh index 152ad35..cd55ead 100644 --- a/kilosort-compiled/compile_and_build_all_ks.sh +++ b/kilosort-compiled/compile_and_build_all_ks.sh @@ -23,6 +23,8 @@ KILOSORT2_PATH=${3%/} KILOSORT25_PATH=${4%/} KILOSORT3_PATH=${5%/} +export MW_NVCC_PATH=/usr/bin/ +export MW_ALLOW_ANY_CUDA=1 cd kilosort-compiled bash compile.sh $KILOSORT_PATH $SPIKEINTERFACE_PATH diff --git a/kilosort4/Dockerfile b/kilosort4/Dockerfile index 80121cb..48060e7 100644 --- a/kilosort4/Dockerfile +++ b/kilosort4/Dockerfile @@ -16,11 +16,11 @@ RUN apt update && \ rm -rf /var/lib/apt/lists/* # install miniconda -ENV MINICONDA_VERSION 24.1.2-0 -ENV PY_VERSION py311 -ENV CONDA_DIR /home/miniconda3 -ENV LATEST_CONDA_SCRIPT "Miniconda3-${PY_VERSION}_${MINICONDA_VERSION}-Linux-x86_64.sh" - +ENV MINICONDA_VERSION=25.5.1-0 +ENV PYTHON_VERSION=py312 +ENV CONDA_DIR=/home/miniconda3 +ENV LATEST_CONDA_SCRIPT="Miniconda3-${PYTHON_VERSION}_${MINICONDA_VERSION}-Linux-x86_64.sh" + RUN wget --quiet https://repo.anaconda.com/miniconda/$LATEST_CONDA_SCRIPT -O ~/miniconda.sh && \ bash ~/miniconda.sh -b -p $CONDA_DIR && \ rm ~/miniconda.sh diff --git a/mountainsort4/Dockerfile b/mountainsort4/Dockerfile index 1e9bd07..2dd9483 100644 --- a/mountainsort4/Dockerfile +++ b/mountainsort4/Dockerfile @@ -1,9 +1,6 @@ -FROM python:3.8 +FROM python:3.10 -# downgrade pip version to avoid dependency issues during installations -RUN pip install --no-input pip==21.2.4 - -RUN pip install numpy +RUN pip install "numpy<2" RUN pip install requests # Install MountainSort4 diff --git a/mountainsort5/Dockerfile b/mountainsort5/Dockerfile index 000e504..383c907 100644 --- a/mountainsort5/Dockerfile +++ b/mountainsort5/Dockerfile @@ -1,8 +1,6 @@ -FROM python:3.10 +FROM python:3.12 # downgrade pip version to avoid dependency issues during installations RUN pip install --upgrade pip - -RUN pip install numpy - +RUN pip install "numpy<2" RUN pip install mountainsort5==0.5.6 diff --git a/rtsort/Dockerfile b/rtsort/Dockerfile new file mode 100644 index 0000000..f0d9b67 --- /dev/null +++ b/rtsort/Dockerfile @@ -0,0 +1,39 @@ +FROM nvidia/cuda:12.0.0-base-ubuntu20.04 + +LABEL maintainer="Alessio Buccino " + +# USER root +# Ubuntu package installs +RUN apt update && \ + apt install -y --no-install-recommends \ + libfftw3-dev \ + git \ + wget && \ + apt clean && \ + rm -rf /var/lib/apt/lists/* + +# install miniconda +ENV MINICONDA_VERSION=25.5.1-0 +ENV PYTHON_VERSION=py312 +ENV CONDA_DIR=/home/miniconda3 +ENV LATEST_CONDA_SCRIPT="Miniconda3-${PYTHON_VERSION}_${MINICONDA_VERSION}-Linux-x86_64.sh" + +RUN wget --quiet https://repo.anaconda.com/miniconda/$LATEST_CONDA_SCRIPT -O ~/miniconda.sh && \ + bash ~/miniconda.sh -b -p $CONDA_DIR && \ + rm ~/miniconda.sh +ENV PATH=$CONDA_DIR/bin:$PATH +RUN conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main && \ + conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r && \ + conda update conda && \ + conda install conda-build + +# make conda activate command available from /bin/bash --login shells +RUN echo ". $CONDA_DIR/etc/profile.d/conda.sh" >> /root/.profile +# make conda activate command available from /bin/bash --interactive shells +RUN conda init bash + +# install torch +RUN pip install torch torch-tensorrt tensorrt + +# install rt-sort +RUN pip install git+https://github.com/braingeneers/braindance#egg=braindance[rt-sort] diff --git a/rtsort/build.sh b/rtsort/build.sh new file mode 100755 index 0000000..655b064 --- /dev/null +++ b/rtsort/build.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker build -t spikeinterface/rtsort-base:latest -t spikeinterface/rtsort-base:0.1.0_cuda-12.0.0 . diff --git a/rtsort/push.sh b/rtsort/push.sh new file mode 100644 index 0000000..6f1025f --- /dev/null +++ b/rtsort/push.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker push --all-tags spikeinterface/rtsort-base diff --git a/waveclus-compiled/Dockerfile b/waveclus-compiled/Dockerfile index 85c9f6c..38580c0 100644 --- a/waveclus-compiled/Dockerfile +++ b/waveclus-compiled/Dockerfile @@ -1,5 +1,7 @@ FROM waveclus-matlab-base +USER root + COPY --from=waveclus-snippets-matlab-base /usr/bin/mlrtapp/waveclus_snippets_compiled /usr/bin/mlrtapp/waveclus_snippets_compiled RUN chmod 755 /usr/bin/mlrtapp/waveclus_compiled RUN chmod 755 /usr/bin/mlrtapp/waveclus_snippets_compiled @@ -13,10 +15,11 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* -ENV MINICONDA_VERSION 4.8.2 -ENV CONDA_DIR /home/miniconda3 -ENV LATEST_CONDA_SCRIPT "Miniconda3-py38_$MINICONDA_VERSION-Linux-x86_64.sh" - +ENV MINICONDA_VERSION=25.5.1-0 +ENV PYTHON_VERSION=py312 +ENV CONDA_DIR=/home/miniconda3 +ENV LATEST_CONDA_SCRIPT="Miniconda3-${PYTHON_VERSION}_${MINICONDA_VERSION}-Linux-x86_64.sh" + RUN wget --quiet https://repo.anaconda.com/miniconda/$LATEST_CONDA_SCRIPT -O ~/miniconda.sh && \ bash ~/miniconda.sh -b -p $CONDA_DIR && \ rm ~/miniconda.sh diff --git a/waveclus-compiled/build.sh b/waveclus-compiled/build.sh index bae75ca..fda973a 100755 --- a/waveclus-compiled/build.sh +++ b/waveclus-compiled/build.sh @@ -1,4 +1,4 @@ #!/bin/bash -docker build -t spikeinterface/waveclus-compiled-base:latest -t spikeinterface/waveclus-compiled-base:0.1.0 . +docker build -t spikeinterface/waveclus-compiled-base:latest -t spikeinterface/waveclus-compiled-base:0.2.0 . diff --git a/waveclus-compiled/compile.sh b/waveclus-compiled/compile.sh index 0f36a47..485cb00 100755 --- a/waveclus-compiled/compile.sh +++ b/waveclus-compiled/compile.sh @@ -30,13 +30,14 @@ mkdir -p $TMP_DIR echo "Compiling waveclus..." cd $TMP_DIR -matlab -batch "mcc -m ${SI_PATH}/spikeinterface/sorters/waveclus/waveclus_master.m -a ${SI_PATH}/spikeinterface/sorters/utils -a ${WC_PATH} -o ${WC_COMPILED_NAME}" +EXTERNAL_SORTERS_FOLDER=${SI_PATH}/src/spikeinterface/sorters/external/ +matlab -batch "mcc -m ${EXTERNAL_SORTERS_FOLDER}/waveclus_master.m -a ${SI_PATH}/src/spikeinterface/sorters/utils -a ${WC_PATH} -o ${WC_COMPILED_NAME}" echo "Creating base docker image..." matlab -batch "compiler.package.docker('${WC_COMPILED_NAME}', 'requiredMCRProducts.txt', 'ImageName', 'waveclus-matlab-base')" echo "Compiling waveclus_snippets..." -matlab -batch "mcc -m ${SI_PATH}/spikeinterface/sorters/waveclus/waveclus_snippets_master.m -a ${SI_PATH}/spikeinterface/sorters/utils -a ${WC_PATH} -o ${WC_SNIPPETS_COMPILED_NAME}" +matlab -batch "mcc -m ${EXTERNAL_SORTERS_FOLDER}/waveclus_snippets_master.m -a ${SI_PATH}/src/spikeinterface/sorters/utils -a ${WC_PATH} -o ${WC_SNIPPETS_COMPILED_NAME}" echo "Creating base docker image..." matlab -batch "compiler.package.docker('${WC_SNIPPETS_COMPILED_NAME}', 'requiredMCRProducts.txt', 'ImageName', 'waveclus-snippets-matlab-base')" From f672e0f4f99da7b108e1761c45ea1d12ea7f9196 Mon Sep 17 00:00:00 2001 From: Alessio Buccino Date: Wed, 23 Jul 2025 17:38:40 +0200 Subject: [PATCH 2/2] update Tridesclous --- tridesclous/Dockerfile | 12 +++--------- tridesclous/build.sh | 2 +- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/tridesclous/Dockerfile b/tridesclous/Dockerfile index 7267923..c8f917c 100644 --- a/tridesclous/Dockerfile +++ b/tridesclous/Dockerfile @@ -1,22 +1,16 @@ -FROM python:3.8 - -# downgrade pip version to avoid dependency issues during installations -RUN pip install --no-input pip==21.2.4 - - +FROM python:3.12 # Install prerequisites RUN apt-get update && apt-get install -y libgl1-mesa-glx # need to force some version -RUN pip install numpy==1.21 +RUN pip install numpy RUN pip install numba RUN pip install hdbscan - RUN pip install Cython RUN pip install scipy pandas scikit-learn matplotlib seaborn tqdm openpyxl quantities neo RUN pip install h5py RUN pip install loky packaging -RUN pip install tridesclous==1.6.5 +RUN pip install tridesclous==1.6.9 diff --git a/tridesclous/build.sh b/tridesclous/build.sh index 4829441..8cdf7e9 100644 --- a/tridesclous/build.sh +++ b/tridesclous/build.sh @@ -1,3 +1,3 @@ #!/bin/bash -docker build -t spikeinterface/tridesclous-base:latest -t spikeinterface/tridesclous-base:1.6.5 . +docker build -t spikeinterface/tridesclous-base:latest -t spikeinterface/tridesclous-base:1.6.9 .