From b52a37cf780763e3278dddc000958e46abdf10f9 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 14 Oct 2024 17:43:19 -0400 Subject: [PATCH 1/3] Docker image: Use newer debian stable for the base and newer dcm2niix --- utils/gen-docker-image.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/gen-docker-image.sh b/utils/gen-docker-image.sh index aeb598b4..e4ceecda 100755 --- a/utils/gen-docker-image.sh +++ b/utils/gen-docker-image.sh @@ -8,10 +8,10 @@ VER=$(grep -Po '(?<=^__version__ = ).*' $thisd/../heudiconv/info.py | sed 's/"// image="kaczmarj/neurodocker:0.9.1" docker run --rm $image generate docker \ - --base-image neurodebian:bullseye \ + --base-image neurodebian:bookworm \ --pkg-manager apt \ --dcm2niix \ - version=v1.0.20220720 \ + version=v1.0.20240202 \ method=source \ cmake_opts="-DZLIB_IMPLEMENTATION=Cloudflare -DUSE_JPEGLS=ON -DUSE_OPENJPEG=ON" \ --install \ From aaabcb0314e994ed709c8d2c0532032601ebf257 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 14 Oct 2024 17:45:37 -0400 Subject: [PATCH 2/3] Make it possible to use podman or docker --- utils/gen-docker-image.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/utils/gen-docker-image.sh b/utils/gen-docker-image.sh index e4ceecda..efa149c9 100755 --- a/utils/gen-docker-image.sh +++ b/utils/gen-docker-image.sh @@ -7,7 +7,16 @@ VER=$(grep -Po '(?<=^__version__ = ).*' $thisd/../heudiconv/info.py | sed 's/"// image="kaczmarj/neurodocker:0.9.1" -docker run --rm $image generate docker \ +if hash podman; then + OCI_BINARY=podman +elif hash docker; then + OCI_BINARY=docker +else + echo "ERROR: no podman or docker found" >&2 + exit 1 +fi + +${OCI_BINARY:-docker} run --rm $image generate docker \ --base-image neurodebian:bookworm \ --pkg-manager apt \ --dcm2niix \ From 06649a6686b25708ca6071744f061a976b309988 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 14 Oct 2024 17:47:15 -0400 Subject: [PATCH 3/3] updated Dockerfile --- Dockerfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index f9bf7fd2..062756f9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # Generated by Neurodocker and Reproenv. -FROM neurodebian:bullseye -ENV PATH="/opt/dcm2niix-v1.0.20220720/bin:$PATH" +FROM neurodebian:bookworm +ENV PATH="/opt/dcm2niix-v1.0.20240202/bin:$PATH" RUN apt-get update -qq \ && apt-get install -y -q --no-install-recommends \ ca-certificates \ @@ -16,10 +16,10 @@ RUN apt-get update -qq \ && git clone https://github.com/rordenlab/dcm2niix /tmp/dcm2niix \ && cd /tmp/dcm2niix \ && git fetch --tags \ - && git checkout v1.0.20220720 \ + && git checkout v1.0.20240202 \ && mkdir /tmp/dcm2niix/build \ && cd /tmp/dcm2niix/build \ - && cmake -DZLIB_IMPLEMENTATION=Cloudflare -DUSE_JPEGLS=ON -DUSE_OPENJPEG=ON -DCMAKE_INSTALL_PREFIX:PATH=/opt/dcm2niix-v1.0.20220720 .. \ + && cmake -DZLIB_IMPLEMENTATION=Cloudflare -DUSE_JPEGLS=ON -DUSE_OPENJPEG=ON -DCMAKE_INSTALL_PREFIX:PATH=/opt/dcm2niix-v1.0.20240202 .. \ && make -j1 \ && make install \ && rm -rf /tmp/dcm2niix @@ -87,19 +87,19 @@ RUN printf '{ \ { \ "name": "from_", \ "kwds": { \ - "base_image": "neurodebian:bullseye" \ + "base_image": "neurodebian:bookworm" \ } \ }, \ { \ "name": "env", \ "kwds": { \ - "PATH": "/opt/dcm2niix-v1.0.20220720/bin:$PATH" \ + "PATH": "/opt/dcm2niix-v1.0.20240202/bin:$PATH" \ } \ }, \ { \ "name": "run", \ "kwds": { \ - "command": "apt-get update -qq\\napt-get install -y -q --no-install-recommends \\\\\\n ca-certificates \\\\\\n cmake \\\\\\n g++ \\\\\\n gcc \\\\\\n git \\\\\\n make \\\\\\n pigz \\\\\\n zlib1g-dev\\nrm -rf /var/lib/apt/lists/*\\ngit clone https://github.com/rordenlab/dcm2niix /tmp/dcm2niix\\ncd /tmp/dcm2niix\\ngit fetch --tags\\ngit checkout v1.0.20220720\\nmkdir /tmp/dcm2niix/build\\ncd /tmp/dcm2niix/build\\ncmake -DZLIB_IMPLEMENTATION=Cloudflare -DUSE_JPEGLS=ON -DUSE_OPENJPEG=ON -DCMAKE_INSTALL_PREFIX:PATH=/opt/dcm2niix-v1.0.20220720 ..\\nmake -j1\\nmake install\\nrm -rf /tmp/dcm2niix" \ + "command": "apt-get update -qq\\napt-get install -y -q --no-install-recommends \\\\\\n ca-certificates \\\\\\n cmake \\\\\\n g++ \\\\\\n gcc \\\\\\n git \\\\\\n make \\\\\\n pigz \\\\\\n zlib1g-dev\\nrm -rf /var/lib/apt/lists/*\\ngit clone https://github.com/rordenlab/dcm2niix /tmp/dcm2niix\\ncd /tmp/dcm2niix\\ngit fetch --tags\\ngit checkout v1.0.20240202\\nmkdir /tmp/dcm2niix/build\\ncd /tmp/dcm2niix/build\\ncmake -DZLIB_IMPLEMENTATION=Cloudflare -DUSE_JPEGLS=ON -DUSE_OPENJPEG=ON -DCMAKE_INSTALL_PREFIX:PATH=/opt/dcm2niix-v1.0.20240202 ..\\nmake -j1\\nmake install\\nrm -rf /tmp/dcm2niix" \ } \ }, \ { \