neurodocker icon indicating copy to clipboard operation
neurodocker copied to clipboard

AFNI docker build fails

Open spurani opened this issue 2 years ago • 17 comments

neurodocker generate docker \
    --pkg-manager apt \
    --base-image debian:buster-slim \
    --afni method=binaries version=latest \
> afni-binaries.Dockerfile

This command successfully generated the dockerfile Here is the dockerfile

# Generated by Neurodocker and Reproenv.

FROM debian:buster-slim
ENV PATH="/opt/afni-latest:$PATH" \
    AFNI_PLUGINPATH="/opt/afni-latest"
RUN apt-get update -qq \
    && apt-get install -y -q --no-install-recommends \
           ca-certificates \
           cmake \
           curl \
           ed \
           gsl-bin \
           libcurl4-openssl-dev \
           libgl1-mesa-dri \
           libglib2.0-0 \
           libglu1-mesa-dev \
           libglw1-mesa \
           libgomp1 \
           libjpeg-turbo8-dev \
           libjpeg62 \
           libssl-dev \
           libudunits2-dev \
           libxm4 \
           multiarch-support \
           netpbm \
           python-is-python3 \
           python3-pip \
           tcsh \
           xfonts-base \
           xvfb \
    && 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}" \
    && _reproenv_tmppath="$(mktemp -t tmp.XXXXXXXXXX.deb)" \
    && curl -fsSL --retry 5 -o "${_reproenv_tmppath}" http://snapshot.debian.org/archive/debian-security/20160113T213056Z/pool/updates/main/libp/libpng/libpng12-0_1.2.49-1%2Bdeb7u2_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/* \
    &&  \
    && gsl_path="$(find / -name 'libgsl.so.??' || printf '')" \
    && if [ -n "$gsl_path" ]; then \
         ln -sfv "$gsl_path" "$(dirname $gsl_path)/libgsl.so.0"; \
    fi \
    && ldconfig \
    && mkdir -p /opt/afni-latest \
    && echo "Downloading AFNI ..." \
    && curl -fL https://afni.nimh.nih.gov/pub/dist/tgz/linux_openmp_64.tgz \
    | tar -xz -C /opt/afni-latest --strip-components 1

# Save specification to JSON.
RUN printf '{ \
  "pkg_manager": "apt", \
  "existing_users": [ \
    "root" \
  ], \
  "instructions": [ \
    { \
      "name": "from_", \
      "kwds": { \
        "base_image": "debian:buster-slim" \
      } \
    }, \
    { \
      "name": "env", \
      "kwds": { \
        "PATH": "/opt/afni-latest:$PATH", \
        "AFNI_PLUGINPATH": "/opt/afni-latest" \
      } \
    }, \
    { \
      "name": "run", \
      "kwds": { \
        "command": "apt-get update -qq\\napt-get install -y -q --no-install-recommends \\\\\\n    ca-certificates \\\\\\n    cmake \\\\\\n    curl \\\\\\n    ed \\\\\\n    gsl-bin \\\\\\n    libcurl4-openssl-dev \\\\\\n    libgl1-mesa-dri \\\\\\n    libglib2.0-0 \\\\\\n    libglu1-mesa-dev \\\\\\n    libglw1-mesa \\\\\\n    libgomp1 \\\\\\n    libjpeg-turbo8-dev \\\\\\n    libjpeg62 \\\\\\n    libssl-dev \\\\\\n    libudunits2-dev \\\\\\n    libxm4 \\\\\\n    multiarch-support \\\\\\n    netpbm \\\\\\n    python-is-python3 \\\\\\n    python3-pip \\\\\\n    tcsh \\\\\\n    xfonts-base \\\\\\n    xvfb\\nrm -rf /var/lib/apt/lists/*\\n_reproenv_tmppath=\\"$\(mktemp -t tmp.XXXXXXXXXX.deb\)\\"\\ncurl -fsSL --retry 5 -o \\"${_reproenv_tmppath}\\" http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb\\napt-get install --yes -q \\"${_reproenv_tmppath}\\"\\nrm \\"${_reproenv_tmppath}\\"\\n_reproenv_tmppath=\\"$\(mktemp -t tmp.XXXXXXXXXX.deb\)\\"\\ncurl -fsSL --retry 5 -o \\"${_reproenv_tmppath}\\" http://snapshot.debian.org/archive/debian-security/20160113T213056Z/pool/updates/main/libp/libpng/libpng12-0_1.2.49-1%%2Bdeb7u2_amd64.deb\\napt-get install --yes -q \\"${_reproenv_tmppath}\\"\\nrm \\"${_reproenv_tmppath}\\"\\napt-get update -qq\\napt-get install --yes --quiet --fix-missing\\nrm -rf /var/lib/apt/lists/*\\n\\ngsl_path=\\"$\(find / -name '"'"'libgsl.so.??'"'"' || printf '"'"''"'"'\)\\"\\nif [ -n \\"$gsl_path\\" ]; then \\\\\\n  ln -sfv \\"$gsl_path\\" \\"$\(dirname $gsl_path\)/libgsl.so.0\\"; \\\\\\nfi\\nldconfig\\nmkdir -p /opt/afni-latest\\necho \\"Downloading AFNI ...\\"\\ncurl -fL https://afni.nimh.nih.gov/pub/dist/tgz/linux_openmp_64.tgz \\\\\\n| tar -xz -C /opt/afni-latest --strip-components 1" \
      } \
    } \
  ] \
}' > /.reproenv.json
# End saving to specification to JSON.

docker build --tag afni:latest --file afni-binaries.Dockerfile . This commad fails with the below error

[+] Building 3.3s (5/6)
 => [internal] load build definition from afni-binaries.Dockerfile                                                 0.0s
 => => transferring dockerfile: 4.34kB                                                                             0.0s
 => [internal] load .dockerignore                                                                                  0.0s
 => => transferring context: 2B                                                                                    0.0s
 => [internal] load metadata for docker.io/library/debian:buster-slim                                              2.6s
 => CACHED [1/3] FROM docker.io/library/debian:buster-slim@sha256:5dbce817ee72802025a38a388237b0ea576aa164bc90b71  0.0s
 => ERROR [2/3] RUN apt-get update -qq     && apt-get install -y -q --no-install-recommends            ca-certifi  0.5s
------
 > [2/3] RUN apt-get update -qq     && apt-get install -y -q --no-install-recommends            ca-certificates            cmake            curl            ed            gsl-bin            libcurl4-openssl-dev            libgl1-mesa-dri            libglib2.0-0            libglu1-mesa-dev            libglw1-mesa            libgomp1            libjpeg-turbo8-dev            libjpeg62            libssl-dev            libudunits2-dev            libxm4            multiarch-support            netpbm            python-is-python3            python3-pip            tcsh            xfonts-base            xvfb     && 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}"     && _reproenv_tmppath="$(mktemp -t tmp.XXXXXXXXXX.deb)"     && curl -fsSL --retry 5 -o "${_reproenv_tmppath}" http://snapshot.debian.org/archive/debian-security/20160113T213056Z/pool/updates/main/libp/libpng/libpng12-0_1.2.49-1%2Bdeb7u2_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/*     &&      && gsl_path="$(find / -name 'libgsl.so.??' || printf '')"     && if [ -n "$gsl_path" ]; then          ln -sfv "$gsl_path" "$(dirname $gsl_path)/libgsl.so.0";     fi     && ldconfig     && mkdir -p /opt/afni-latest     && echo "Downloading AFNI ..."     && curl -fL https://afni.nimh.nih.gov/pub/dist/tgz/linux_openmp_64.tgz     | tar -xz -C /opt/afni-latest --strip-components 1:
#5 0.495 /bin/sh: 1: Syntax error: "&&" unexpected
------
executor failed running [/bin/sh -c apt-get update -qq     && apt-get install -y -q --no-install-recommends            ca-certificates            cmake            curl            ed            gsl-bin            libcurl4-openssl-dev            libgl1-mesa-dri            libglib2.0-0            libglu1-mesa-dev            libglw1-mesa            libgomp1            libjpeg-turbo8-dev            libjpeg62            libssl-dev            libudunits2-dev            libxm4            multiarch-support            netpbm            python-is-python3            python3-pip            tcsh            xfonts-base            xvfb     && 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}"     && _reproenv_tmppath="$(mktemp -t tmp.XXXXXXXXXX.deb)"     && curl -fsSL --retry 5 -o "${_reproenv_tmppath}" http://snapshot.debian.org/archive/debian-security/20160113T213056Z/pool/updates/main/libp/libpng/libpng12-0_1.2.49-1%2Bdeb7u2_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/*     &&      && gsl_path="$(find / -name 'libgsl.so.??' || printf '')"     && if [ -n "$gsl_path" ]; then          ln -sfv "$gsl_path" "$(dirname $gsl_path)/libgsl.so.0";     fi     && ldconfig     && mkdir -p /opt/afni-latest     && echo "Downloading AFNI ..."     && curl -fL https://afni.nimh.nih.gov/pub/dist/tgz/linux_openmp_64.tgz     | tar -xz -C /opt/afni-latest --strip-components 1]: exit code: 2

Can anyone please guide me?

spurani avatar Nov 22 '22 22:11 spurani

Dear @spurani,

It looks like you are facing a bug that was fixed a few weeks ago. The problem was that the AFNI recipe added an empty line and this is causing the && error.

I submitted a pull request to fix this and it was merged: https://github.com/NeuroDesk/neurodocker/commit/3da4e04b9d3659c0b0381db127fa2dcc86bfd056

Can you check if you are using the latest version of Neurodocker and if this fix is included?

Cheers Steffen

stebo85 avatar Nov 23 '22 00:11 stebo85

Dear @spurani,

It looks like you are facing a bug that was fixed a few weeks ago. The problem was that the AFNI recipe added an empty line and this is causing the && error.

I submitted a pull request to fix this and it was merged: NeuroDesk@3da4e04

Can you check if you are using the latest version of Neurodocker and if this fix is included?

Cheers Steffen Hello @stebo85,

Thank you for your quick response. Basically, I installed neurodocker using this command pip install neurodocker and my current version is 0.9.1. Earlier, I tried the preferred installation using docker run --rm repronim/neurodocker:0.7.0 --help it did not install neurodocker nor it gave any errors or warnings. is this page still active and updated repronim/neurodocker Tags? because the last update I see is 3years ago.

spurani avatar Nov 23 '22 13:11 spurani

thanks @stebo85 and @spurani. looks like we need to cut a new release and upload to pypi and dockerhub.

@djarecka @satra - I do not have permissions to upload to repronim/neurodocker on dockerhub. Can you please give me permissions to do this?

kaczmarj avatar Nov 23 '22 13:11 kaczmarj

Dear @spurani,

You should be able to install the latest version of Neurodocker via: pip install --no-cache-dir https://github.com/repronim/neurodocker/tarball/master

and that should include the fix

Cheers Steffen

stebo85 avatar Nov 23 '22 22:11 stebo85

@kaczmarj - sent an invite, but also set up automatic building for this repo (we can add version based building as well). we may have to disconnect you as the org has only 5 seats. we do have a service account that we can use.

satra avatar Nov 23 '22 23:11 satra

Hello @stebo85 Here are the steps I followed

  1. Uninstalled neurodocker pip uninstall neurodocker from my current os environment

  2. Fresh install of Neurodocker pip install --no-cache-dir https://github.com/repronim/neurodocker/tarball/master and generated the Dockerfile with this command

neurodocker --version
neurodocker version 0.9.1
neurodocker generate docker \
    --pkg-manager apt \
    --base-image debian:stable \
    --afni method=binaries version=latest \
    --fsl version='6.0.5.1' > AFNI_FSL_Dockerfile.Dockerfile

it generated this Dockerfile

# Generated by Neurodocker and Reproenv.

FROM debian:stable
ENV PATH="/opt/afni-latest:$PATH" \
    AFNI_PLUGINPATH="/opt/afni-latest"
RUN apt-get update -qq \
    && apt-get install -y -q --no-install-recommends \
           ca-certificates \
           cmake \
           curl \
           ed \
           gsl-bin \
           libcurl4-openssl-dev \
           libgl1-mesa-dri \
           libglib2.0-0 \
           libglu1-mesa-dev \
           libglw1-mesa \
           libgomp1 \
           libjpeg-turbo8-dev \
           libjpeg62 \
           libssl-dev \
           libudunits2-dev \
           libxm4 \
           multiarch-support \
           netpbm \
           python-is-python3 \
           python3-pip \
           tcsh \
           xfonts-base \
           xvfb \
    && 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}" \
    && _reproenv_tmppath="$(mktemp -t tmp.XXXXXXXXXX.deb)" \
    && curl -fsSL --retry 5 -o "${_reproenv_tmppath}" http://snapshot.debian.org/archive/debian-security/20160113T213056Z/pool/updates/main/libp/libpng/libpng12-0_1.2.49-1%2Bdeb7u2_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/* \
    &&  \
    && gsl_path="$(find / -name 'libgsl.so.??' || printf '')" \
    && if [ -n "$gsl_path" ]; then \
         ln -sfv "$gsl_path" "$(dirname $gsl_path)/libgsl.so.0"; \
    fi \
    && ldconfig \
    && mkdir -p /opt/afni-latest \
    && echo "Downloading AFNI ..." \
    && curl -fL https://afni.nimh.nih.gov/pub/dist/tgz/linux_openmp_64.tgz \
    | tar -xz -C /opt/afni-latest --strip-components 1
ENV FSLDIR="/opt/fsl-6.0.5.1" \
    PATH="/opt/fsl-6.0.5.1/bin:$PATH" \
    FSLOUTPUTTYPE="NIFTI_GZ" \
    FSLMULTIFILEQUIT="TRUE" \
    FSLTCLSH="/opt/fsl-6.0.5.1/bin/fsltclsh" \
    FSLWISH="/opt/fsl-6.0.5.1/bin/fslwish" \
    FSLLOCKDIR="" \
    FSLMACHINELIST="" \
    FSLREMOTECALL="" \
    FSLGECUDAQ="cuda.q"
RUN apt-get update -qq \
    && apt-get install -y -q --no-install-recommends \
           bc \
           ca-certificates \
           curl \
           dc \
           file \
           libfontconfig1 \
           libfreetype6 \
           libgl1-mesa-dev \
           libgl1-mesa-dri \
           libglu1-mesa-dev \
           libgomp1 \
           libice6 \
           libopenblas-base \
           libxcursor1 \
           libxft2 \
           libxinerama1 \
           libxrandr2 \
           libxrender1 \
           libxt6 \
           nano \
           sudo \
           wget \
    && rm -rf /var/lib/apt/lists/* \
    && echo "Downloading FSL ..." \
    && mkdir -p /opt/fsl-6.0.5.1 \
    && curl -fL https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-6.0.5.1-centos7_64.tar.gz \
    | tar -xz -C /opt/fsl-6.0.5.1 --strip-components 1 \
    && echo "Installing FSL conda environment ..." \
    && bash /opt/fsl-6.0.5.1/etc/fslconf/fslpython_install.sh -f /opt/fsl-6.0.5.1

# Save specification to JSON.
RUN printf '{ \
  "pkg_manager": "apt", \
  "existing_users": [ \
    "root" \
  ], \
  "instructions": [ \
    { \
      "name": "from_", \
      "kwds": { \
        "base_image": "debian:stable" \
      } \
    }, \
    { \
      "name": "env", \
      "kwds": { \
        "PATH": "/opt/afni-latest:$PATH", \
        "AFNI_PLUGINPATH": "/opt/afni-latest" \
      } \
    }, \
    { \
      "name": "run", \
      "kwds": { \
        "command": "apt-get update -qq\\napt-get install -y -q --no-install-recommends \\\\\\n    ca-certificates \\\\\\n    cmake \\\\\\n    curl \\\\\\n    ed \\\\\\n    gsl-bin \\\\\\n    libcurl4-openssl-dev \\\\\\n    libgl1-mesa-dri \\\\\\n    libglib2.0-0 \\\\\\n    libglu1-mesa-dev \\\\\\n    libglw1-mesa \\\\\\n    libgomp1 \\\\\\n    libjpeg-turbo8-dev \\\\\\n    libjpeg62 \\\\\\n    libssl-dev \\\\\\n    libudunits2-dev \\\\\\n    libxm4 \\\\\\n    multiarch-support \\\\\\n    netpbm \\\\\\n    python-is-python3 \\\\\\n    python3-pip \\\\\\n    tcsh \\\\\\n    xfonts-base \\\\\\n    xvfb\\nrm -rf /var/lib/apt/lists/*\\n_reproenv_tmppath=\\"$\(mktemp -t tmp.XXXXXXXXXX.deb\)\\"\\ncurl -fsSL --retry 5 -o \\"${_reproenv_tmppath}\\" http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb\\napt-get install --yes -q \\"${_reproenv_tmppath}\\"\\nrm \\"${_reproenv_tmppath}\\"\\n_reproenv_tmppath=\\"$\(mktemp -t tmp.XXXXXXXXXX.deb\)\\"\\ncurl -fsSL --retry 5 -o \\"${_reproenv_tmppath}\\" http://snapshot.debian.org/archive/debian-security/20160113T213056Z/pool/updates/main/libp/libpng/libpng12-0_1.2.49-1%%2Bdeb7u2_amd64.deb\\napt-get install --yes -q \\"${_reproenv_tmppath}\\"\\nrm \\"${_reproenv_tmppath}\\"\\napt-get update -qq\\napt-get install --yes --quiet --fix-missing\\nrm -rf /var/lib/apt/lists/*\\n\\ngsl_path=\\"$\(find / -name '"'"'libgsl.so.??'"'"' || printf '"'"''"'"'\)\\"\\nif [ -n \\"$gsl_path\\" ]; then \\\\\\n  ln -sfv \\"$gsl_path\\" \\"$\(dirname $gsl_path\)/libgsl.so.0\\"; \\\\\\nfi\\nldconfig\\nmkdir -p /opt/afni-latest\\necho \\"Downloading AFNI ...\\"\\ncurl -fL https://afni.nimh.nih.gov/pub/dist/tgz/linux_openmp_64.tgz \\\\\\n| tar -xz -C /opt/afni-latest --strip-components 1" \
      } \
    }, \
    { \
      "name": "env", \
      "kwds": { \
        "FSLDIR": "/opt/fsl-6.0.5.1", \
        "PATH": "/opt/fsl-6.0.5.1/bin:$PATH", \
        "FSLOUTPUTTYPE": "NIFTI_GZ", \
        "FSLMULTIFILEQUIT": "TRUE", \
        "FSLTCLSH": "/opt/fsl-6.0.5.1/bin/fsltclsh", \
        "FSLWISH": "/opt/fsl-6.0.5.1/bin/fslwish", \
        "FSLLOCKDIR": "", \
        "FSLMACHINELIST": "", \
        "FSLREMOTECALL": "", \
        "FSLGECUDAQ": "cuda.q" \
      } \
    }, \
    { \
      "name": "run", \
      "kwds": { \
        "command": "apt-get update -qq\\napt-get install -y -q --no-install-recommends \\\\\\n    bc \\\\\\n    ca-certificates \\\\\\n    curl \\\\\\n    dc \\\\\\n    file \\\\\\n    libfontconfig1 \\\\\\n    libfreetype6 \\\\\\n    libgl1-mesa-dev \\\\\\n    libgl1-mesa-dri \\\\\\n    libglu1-mesa-dev \\\\\\n    libgomp1 \\\\\\n    libice6 \\\\\\n    libopenblas-base \\\\\\n    libxcursor1 \\\\\\n    libxft2 \\\\\\n    libxinerama1 \\\\\\n    libxrandr2 \\\\\\n    libxrender1 \\\\\\n    libxt6 \\\\\\n    nano \\\\\\n    sudo \\\\\\n    wget\\nrm -rf /var/lib/apt/lists/*\\necho \\"Downloading FSL ...\\"\\nmkdir -p /opt/fsl-6.0.5.1\\ncurl -fL https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-6.0.5.1-centos7_64.tar.gz \\\\\\n| tar -xz -C /opt/fsl-6.0.5.1 --strip-components 1 \\necho \\"Installing FSL conda environment ...\\"\\nbash /opt/fsl-6.0.5.1/etc/fslconf/fslpython_install.sh -f /opt/fsl-6.0.5.1" \
      } \
    } \
  ] \
}' > /.reproenv.json
# End saving to specification to JSON.

This is the error

Sending build context to Docker daemon  8.704kB
Step 1/6 : FROM debian:stable
 ---> 096ef7a0068a
Step 2/6 : ENV PATH="/opt/afni-latest:$PATH"     AFNI_PLUGINPATH="/opt/afni-latest"
 ---> Using cache
 ---> 1ef720b7f33d
Step 3/6 : RUN apt-get update -qq     && apt-get install -y -q --no-install-recommends            ca-certificates            cmake            curl            ed            gsl-bin            libcurl4-openssl-dev            libgl1-mesa-dri            libglib2.0-0            libglu1-mesa-dev            libglw1-mesa            libgomp1            libjpeg-turbo8-dev            libjpeg62            libssl-dev            libudunits2-dev            libxm4            multiarch-support            netpbm            python-is-python3            python3-pip            tcsh            xfonts-base            xvfb     && 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}"     && _reproenv_tmppath="$(mktemp -t tmp.XXXXXXXXXX.deb)"     && curl -fsSL --retry 5 -o "${_reproenv_tmppath}" http://snapshot.debian.org/archive/debian-security/20160113T213056Z/pool/updates/main/libp/libpng/libpng12-0_1.2.49-1%2Bdeb7u2_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/*     &&      && gsl_path="$(find / -name 'libgsl.so.??' || printf '')"     && if [ -n "$gsl_path" ]; then          ln -sfv "$gsl_path" "$(dirname $gsl_path)/libgsl.so.0";     fi     && ldconfig     && mkdir -p /opt/afni-latest     && echo "Downloading AFNI ..."     && curl -fL https://afni.nimh.nih.gov/pub/dist/tgz/linux_openmp_64.tgz     | tar -xz -C /opt/afni-latest --strip-components 1
 ---> Running in f5cfaafa2678
/bin/sh: 1: Syntax error: "&&" unexpected
The command '/bin/sh -c apt-get update -qq     && apt-get install -y -q --no-install-recommends            ca-certificates            cmake            curl            ed            gsl-bin            libcurl4-openssl-dev            libgl1-mesa-dri            libglib2.0-0            libglu1-mesa-dev            libglw1-mesa            libgomp1            libjpeg-turbo8-dev            libjpeg62            libssl-dev            libudunits2-dev            libxm4            multiarch-support            netpbm            python-is-python3            python3-pip            tcsh            xfonts-base            xvfb     && 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}"     && _reproenv_tmppath="$(mktemp -t tmp.XXXXXXXXXX.deb)"     && curl -fsSL --retry 5 -o "${_reproenv_tmppath}" http://snapshot.debian.org/archive/debian-security/20160113T213056Z/pool/updates/main/libp/libpng/libpng12-0_1.2.49-1%2Bdeb7u2_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/*     &&      && gsl_path="$(find / -name 'libgsl.so.??' || printf '')"     && if [ -n "$gsl_path" ]; then          ln -sfv "$gsl_path" "$(dirname $gsl_path)/libgsl.so.0";     fi     && ldconfig     && mkdir -p /opt/afni-latest     && echo "Downloading AFNI ..."     && curl -fL https://afni.nimh.nih.gov/pub/dist/tgz/linux_openmp_64.tgz     | tar -xz -C /opt/afni-latest --strip-components 1' returned a non-zero code: 2

spurani avatar Nov 24 '22 15:11 spurani

When I am removing && \ from line 43 image

here is the error I get

Sending build context to Docker daemon  16.38kB
Step 1/6 : FROM debian:stable
 ---> 096ef7a0068a
Step 2/6 : ENV PATH="/opt/afni-latest:$PATH"     AFNI_PLUGINPATH="/opt/afni-latest"
 ---> Using cache
 ---> 1ef720b7f33d
Step 3/6 : RUN apt-get update -qq     && apt-get install -y -q --no-install-recommends            ca-certificates            cmake            curl            ed            gsl-bin            libcurl4-openssl-dev            libgl1-mesa-dri            libglib2.0-0            libglu1-mesa-dev            libglw1-mesa            libgomp1            libjpeg-turbo8-dev            libjpeg62            libssl-dev            libudunits2-dev            libxm4            multiarch-support            netpbm            python-is-python3            python3-pip            tcsh            xfonts-base            xvfb     && 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}"     && _reproenv_tmppath="$(mktemp -t tmp.XXXXXXXXXX.deb)"     && curl -fsSL --retry 5 -o "${_reproenv_tmppath}" http://snapshot.debian.org/archive/debian-security/20160113T213056Z/pool/updates/main/libp/libpng/libpng12-0_1.2.49-1%2Bdeb7u2_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/*     && > dev/null     && gsl_path="$(find / -name 'libgsl.so.??' || printf '')"     && if [ -n "$gsl_path" ]; then          ln -sfv "$gsl_path" "$(dirname $gsl_path)/libgsl.so.0";     fi     && ldconfig     && mkdir -p /opt/afni-latest     && echo "Downloading AFNI ..."     && curl -fL https://afni.nimh.nih.gov/pub/dist/tgz/linux_openmp_64.tgz     | tar -xz -C /opt/afni-latest --strip-components 1
 ---> Running in 62cc348ce22c
Reading package lists...
Building dependency tree...
Reading state information...
Package libjpeg-turbo8-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libjpeg-turbo8-dev' has no installation candidate
E: Unable to locate package multiarch-support
The command '/bin/sh -c apt-get update -qq     && apt-get install -y -q --no-install-recommends            ca-certificates            cmake            curl            ed            gsl-bin            libcurl4-openssl-dev            libgl1-mesa-dri            libglib2.0-0            libglu1-mesa-dev            libglw1-mesa            libgomp1            libjpeg-turbo8-dev            libjpeg62            libssl-dev            libudunits2-dev            libxm4            multiarch-support            netpbm            python-is-python3            python3-pip            tcsh            xfonts-base            xvfb     && 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}"     && _reproenv_tmppath="$(mktemp -t tmp.XXXXXXXXXX.deb)"     && curl -fsSL --retry 5 -o "${_reproenv_tmppath}" http://snapshot.debian.org/archive/debian-security/20160113T213056Z/pool/updates/main/libp/libpng/libpng12-0_1.2.49-1%2Bdeb7u2_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/*     && > dev/null     && gsl_path="$(find / -name 'libgsl.so.??' || printf '')"     && if [ -n "$gsl_path" ]; then          ln -sfv "$gsl_path" "$(dirname $gsl_path)/libgsl.so.0";     fi     && ldconfig     && mkdir -p /opt/afni-latest     && echo "Downloading AFNI ..."     && curl -fL https://afni.nimh.nih.gov/pub/dist/tgz/linux_openmp_64.tgz     | tar -xz -C /opt/afni-latest --strip-components 1' returned a non-zero code: 100

Debian does not have libjpeg-turbo8-dev and multiarchsupport multiarch issue neurodocker

debian packages it has libjpeg62-turbo-dev

spurani avatar Nov 24 '22 15:11 spurani

Hello,

I am also getting the same error while building afni as described on official example page.

Further, when tried the workaround mentioned in issue,the error message is:

dpkg-deb: error: '/tmp/toinstall.deb' is not a Debian format archive dpkg: error processing archive /tmp/toinstall.deb (--install): dpkg-deb --control subprocess returned error exit status 2 Errors were encountered while processing: /tmp/toinstall.deb

my neurodocker version is 0.9.1 and installed as instructed above i.e pip install --no-cache-dir https://github.com/repronim/neurodocker/tarball/master.

Is there any step i am missing?

anandsaini024 avatar Nov 28 '22 14:11 anandsaini024

Dear @spurani and @anandsaini024

can you try this:

yes | pip uninstall neurodocker

pip install --no-cache-dir https://github.com/NeuroDesk/neurodocker/tarball/fix-afni-recipe-spaces-python-R-packages  --upgrade

and as a base container I found that fedora:36 works best for AFNI.

Here you can find how we build AFNI for the neurodesk project: https://github.com/NeuroDesk/neurocontainers/tree/master/recipes/afni

You could also directly use the neurodesk AFNI container if you like - then you don't have to build it yourself :) https://www.neurodesk.org/docs/neurocontainers/docker/

This would give you the current afni docker container (we also provide singularity containers):

docker pull vnmd/afni_22.3.06

Thank you Steffen

stebo85 avatar Nov 29 '22 00:11 stebo85

@spurani and @anandsaini024 - have you tried the @stebo85 suggestions? did it work?

djarecka avatar Feb 17 '23 22:02 djarecka

A little addition to my previous recommendation: There is a little bug in suma that crashes it when changing the t-statistic slider in Fedora 36, Fedora 35 however works ... so we are now installing afni in a Fedora 35 container.

stebo85 avatar Feb 20 '23 00:02 stebo85

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

github-actions[bot] avatar Aug 24 '23 01:08 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Oct 23 '23 01:10 github-actions[bot]

issue was not automagically addressed!

debian packages it has libjpeg62-turbo-dev

Different releases of debian/ubuntu might have different packages. BUT in this case it seems that indeed

  • it was never in debian according to https://snapshot.debian.org/binary/libjpeg-turbo8-dev/ .
  • and that libjpeg-turbo8-dev is present in ubuntus https://packages.ubuntu.com/search?keywords=libjpeg-turbo8
  • https://packages.debian.org/search?keywords=libjpeg62-turbo-dev is indeed there for all recent debians
  • but even better probably just to use https://packages.debian.org/libjpeg-dev which depends on libjpeg62-turbo-dev
  • ubuntu also has https://packages.ubuntu.com/search?suite=default&section=all&arch=any&keywords=libjpeg-dev&searchon=names which depends on

so when added in 3da4e04b9d3659c0b0381db127fa2dcc86bfd056 I guess @stebo85 used ubuntu and thus that package.

multiarch-support is in general no longer needed AFAIK since long ago and could be removed.

but then there is also use of

neurodocker/templates/afni.yaml:      - http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb
neurodocker/templates/afni.yaml:      - http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb
neurodocker/templates/spm12.yaml:    - http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb

which is no longer there since not present in any supported currently debian release... https://snapshot.debian.org/archive/debian/20140820T220424Z/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb should be there forever... but that package does require that elderly multiarch-support so it would then need to be also attempted to be downloaded/installed.

Current problem is https://github.com/afni/afni/issues/596 ... I will draft a PR with what I have so far

yarikoptic avatar Mar 27 '24 20:03 yarikoptic

that's great!

stebo85 avatar Apr 01 '24 22:04 stebo85

thanks @yarikoptic :)

kaczmarj avatar Apr 04 '24 13:04 kaczmarj

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

github-actions[bot] avatar Jun 04 '24 01:06 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Aug 03 '24 01:08 github-actions[bot]