ReproNim / neurodocker

Generate custom Docker and Singularity images, and minimize existing containers
https://www.repronim.org/neurodocker/
Apache License 2.0
324 stars 97 forks source link

SPM cannot be installed on neurodebian #535

Open effigies opened 1 year ago

effigies commented 1 year ago

Trying to get CircleCI working for nipype again. Neurodocker is the blocker. There will be several of these, but one at a time.

Following the example at https://www.repronim.org/neurodocker/user_guide/examples.html#spm

neurodocker generate docker \
    --pkg-manager apt \
    --base-image debian:stretch-slim \
    --spm12 version=r7771 \
> spm12-r7771.Dockerfile

docker build --tag spm12:r7771 --file spm12-r7771.Dockerfile .
 > [2/3] RUN export TMPDIR="$(mktemp -d)"     && apt-get update -qq     && apt-get install -y -q --no-install-recommends            bc            ca-certificates            curl            libncurses5            libxext6            libxmu6            libxpm-dev            libxt6            multiarch-support            unzip     && rm -rf /var/lib/apt/lists/*     && _reproenv_tmppath="$(mktemp -t tmp.XXXXXXXXXX.deb)"     && curl -fsSL --retry 5 -o "${_reproenv_tmppath}" http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb     && apt-get install --yes -q "${_reproenv_tmppath}"     && rm "${_reproenv_tmppath}"     && apt-get update -qq     && apt-get install --yes --quiet --fix-missing     && rm -rf /var/lib/apt/lists/*     && echo "Downloading MATLAB Compiler Runtime ..."     && curl -fL -o "$TMPDIR/MCRInstaller.bin" https://dl.dropbox.com/s/zz6me0c3v4yq5fd/MCR_R2010a_glnxa64_installer.bin     && chmod +x "$TMPDIR/MCRInstaller.bin"     && "$TMPDIR/MCRInstaller.bin" -silent -P installLocation="/opt/matlab-compiler-runtime-2010a"     && rm -rf "$TMPDIR"     && unset TMPDIR     && echo "Downloading standalone SPM12 ..."     && curl -fL -o /tmp/spm12.zip https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/previous/spm12_r7771_R2010a.zip     && unzip -q /tmp/spm12.zip -d /tmp     && mkdir -p /opt/spm12-r7771     && mv /tmp/spm12/* /opt/spm12-r7771/     && chmod -R 777 /opt/spm12-r7771     && rm -rf /tmp/spm*     && /opt/spm12-r7771/run_spm12.sh /opt/matlab-compiler-runtime-2010a/v713 quit:
#0 1.512 W: The repository 'http://deb.debian.org/debian stretch Release' does not have a Release file.
#0 1.512 W: The repository 'http://deb.debian.org/debian stretch-updates Release' does not have a Release file.
#0 1.512 W: The repository 'http://security.debian.org/debian-security stretch/updates Release' does not have a Release file.
#0 1.512 E: Failed to fetch http://deb.debian.org/debian/dists/stretch/main/binary-amd64/Packages  404  Not Found
#0 1.512 E: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/main/binary-amd64/Packages  404  Not Found
#0 1.512 E: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/main/binary-amd64/Packages  404  Not Found [IP: 151.101.130.132 80]
#0 1.512 E: Some index files failed to download. They have been ignored, or old ones used instead.
------
Dockerfile:9
--------------------
   8 |         MATLABCMD="/opt/matlab-compiler-runtime-2010a/v713/toolbox/matlab"
   9 | >>> RUN export TMPDIR="$(mktemp -d)" \
  10 | >>>     && apt-get update -qq \
  11 | >>>     && apt-get install -y -q --no-install-recommends \
  12 | >>>            bc \
  13 | >>>            ca-certificates \
  14 | >>>            curl \
  15 | >>>            libncurses5 \
  16 | >>>            libxext6 \
  17 | >>>            libxmu6 \
  18 | >>>            libxpm-dev \
  19 | >>>            libxt6 \
  20 | >>>            multiarch-support \
  21 | >>>            unzip \
  22 | >>>     && rm -rf /var/lib/apt/lists/* \
  23 | >>>     && _reproenv_tmppath="$(mktemp -t tmp.XXXXXXXXXX.deb)" \
  24 | >>>     && curl -fsSL --retry 5 -o "${_reproenv_tmppath}" http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb \
  25 | >>>     && apt-get install --yes -q "${_reproenv_tmppath}" \
  26 | >>>     && rm "${_reproenv_tmppath}" \
  27 | >>>     && apt-get update -qq \
  28 | >>>     && apt-get install --yes --quiet --fix-missing \
  29 | >>>     && rm -rf /var/lib/apt/lists/* \
  30 | >>>     && echo "Downloading MATLAB Compiler Runtime ..." \
  31 | >>>     && curl -fL -o "$TMPDIR/MCRInstaller.bin" https://dl.dropbox.com/s/zz6me0c3v4yq5fd/MCR_R2010a_glnxa64_installer.bin \
  32 | >>>     && chmod +x "$TMPDIR/MCRInstaller.bin" \
  33 | >>>     && "$TMPDIR/MCRInstaller.bin" -silent -P installLocation="/opt/matlab-compiler-runtime-2010a" \
  34 | >>>     && rm -rf "$TMPDIR" \
  35 | >>>     && unset TMPDIR \
  36 | >>>     # Install spm12
  37 | >>>     && echo "Downloading standalone SPM12 ..." \
  38 | >>>     && curl -fL -o /tmp/spm12.zip https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/previous/spm12_r7771_R2010a.zip \
  39 | >>>     && unzip -q /tmp/spm12.zip -d /tmp \
  40 | >>>     && mkdir -p /opt/spm12-r7771 \
  41 | >>>     && mv /tmp/spm12/* /opt/spm12-r7771/ \
  42 | >>>     && chmod -R 777 /opt/spm12-r7771 \
  43 | >>>     && rm -rf /tmp/spm* \
  44 | >>>     # Test
  45 | >>>     && /opt/spm12-r7771/run_spm12.sh /opt/matlab-compiler-runtime-2010a/v713 quit
  46 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c export TMPDIR=\"$(mktemp -d)\"     && apt-get update -qq     && apt-get install -y -q --no-install-recommends            bc            ca-certificates            curl            libncurses5            libxext6            libxmu6            libxpm-dev            libxt6            multiarch-support            unzip     && rm -rf /var/lib/apt/lists/*     && _reproenv_tmppath=\"$(mktemp -t tmp.XXXXXXXXXX.deb)\"     && curl -fsSL --retry 5 -o \"${_reproenv_tmppath}\" http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb     && apt-get install --yes -q \"${_reproenv_tmppath}\"     && rm \"${_reproenv_tmppath}\"     && apt-get update -qq     && apt-get install --yes --quiet --fix-missing     && rm -rf /var/lib/apt/lists/*     && echo \"Downloading MATLAB Compiler Runtime ...\"     && curl -fL -o \"$TMPDIR/MCRInstaller.bin\" https://dl.dropbox.com/s/zz6me0c3v4yq5fd/MCR_R2010a_glnxa64_installer.bin     && chmod +x \"$TMPDIR/MCRInstaller.bin\"     && \"$TMPDIR/MCRInstaller.bin\" -silent -P installLocation=\"/opt/matlab-compiler-runtime-2010a\"     && rm -rf \"$TMPDIR\"     && unset TMPDIR     && echo \"Downloading standalone SPM12 ...\"     && curl -fL -o /tmp/spm12.zip https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/previous/spm12_r7771_R2010a.zip     && unzip -q /tmp/spm12.zip -d /tmp     && mkdir -p /opt/spm12-r7771     && mv /tmp/spm12/* /opt/spm12-r7771/     && chmod -R 777 /opt/spm12-r7771     && rm -rf /tmp/spm*     && /opt/spm12-r7771/run_spm12.sh /opt/matlab-compiler-runtime-2010a/v713 quit" did not complete successfully: exit code: 100
tzuifurther commented 12 months ago

Hi the debian should update, and change the apt url. aslo see https://unix.stackexchange.com/a/371907

Remi-Gau commented 11 months ago

Confirm that the only base image we test with that seems to work for SPM12 is centos.

https://github.com/ReproNim/neurodocker/blob/test_docker_build/docs/README.md#spm12

https://camo.githubusercontent.com/82af8553bd63bff70da608e0b1945d9b06dfa6617ddf18c44c87cc516bbb153a/687474703a2f2f6769746875622d616374696f6e732e3430616e74732e636f6d2f526570726f4e696d2f6e6575726f646f636b65722f6d61747269782e7376673f6272616e63683d746573745f646f636b65725f6275696c64266f6e6c793d73706d3132

gllmflndn commented 11 months ago

This should be resolved if more recent versions of the MATLAB Runtime were used with SPM12 r7771. They are available here:

https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/spm12/

github-actions[bot] commented 10 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 8 months ago

This issue is stale because it has been open for 30 days with no activity.

effigies commented 1 month ago

Just a note that this doesn't work with:

1) debian:stretch-slim

      10 | >>>     && apt-get update -qq \
* Error:
    ```
    8.321 W: The repository 'http://security.debian.org/debian-security stretch/updates Release' does not have a Release file.
    8.321 W: The repository 'http://deb.debian.org/debian stretch Release' does not have a Release file.
    8.321 W: The repository 'http://deb.debian.org/debian stretch-updates Release' does not have a Release file.
    8.321 E: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/main/binary-amd64/Packages  404  Not Found [IP: 151.101.194.132 80]
    8.321 E: Failed to fetch http://deb.debian.org/debian/dists/stretch/main/binary-amd64/Packages  404  Not Found
    8.321 E: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/main/binary-amd64/Packages  404  Not Found
    8.321 E: Some index files failed to download. They have been ignored, or old ones used instead.
    ```

2) debian:bullseye-slim

      11 | >>>     && apt-get install -y -q --no-install-recommends \
      12 | >>>            bc \
      13 | >>>            ca-certificates \
      14 | >>>            curl \
      15 | >>>            libncurses5 \
      16 | >>>            libxext6 \
      17 | >>>            libxmu6 \
      18 | >>>            libxpm-dev \
      19 | >>>            libxt6 \
      20 | >>>            multiarch-support \
      21 | >>>            unzip \
* Error: `3.912 E: Unable to locate package multiarch-support`

3) debian:buster-slim

     24 | >>>     && curl -fsSL --retry 5 -o "${_reproenv_tmppath}" http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb \

The problems are currently with the recipe, not SPM.