diff --git a/kilosort4/Dockerfile_cuda13 b/kilosort4/Dockerfile_cuda13 new file mode 100644 index 0000000..2a863d8 --- /dev/null +++ b/kilosort4/Dockerfile_cuda13 @@ -0,0 +1,43 @@ +FROM nvidia/cuda:13.3.0-base-ubuntu22.04 + +LABEL maintainer="Alessio Buccino " + +ENV KILOSORT4_VERSION=4.1.7 + + +# 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 conda install -y pytorch pytorch-cuda=11.8 -c pytorch -c nvidia +RUN pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 + +# install kilosort4 +RUN pip install kilosort==$KILOSORT4_VERSION diff --git a/kilosort4/build_cuda13.sh b/kilosort4/build_cuda13.sh new file mode 100755 index 0000000..3a2af56 --- /dev/null +++ b/kilosort4/build_cuda13.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Extract the KILOSORT4_VERSION from the Dockerfile +KILOSORT4_VERSION=$(grep -E '^ENV KILOSORT4_VERSION=' "Dockerfile" | awk -F= '{print $2}' | tr -d '[:space:]') +echo "Building kilosort4-base:$KILOSORT4_VERSION" + +docker build -t spikeinterface/kilosort4-base:latest -t spikeinterface/kilosort4-base:${KILOSORT4_VERSION}_cuda-13.3.0 .