ReproNim / neurodocker

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

afni-binaries-r.Dockerfile build fails #519

Closed andreifoldes closed 1 year ago

andreifoldes commented 1 year ago

Hello I tried running the following based on the examples from the website:

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

docker build --tag afni:latest-with-r --file afni-binaries-r.Dockerfile .

..but got the following error messages during build:

#5 7.532 Reading package lists...
#5 8.659 Building dependency tree...
#5 8.859 Reading state information...
#5 8.886 Package libjpeg-turbo8-dev is not available, but is referred to by another package.
#5 8.886 This may mean that the package is missing, has been obsoleted, or
#5 8.886 is only available from another source
#5 8.886
#5 9.011 E: Package 'libjpeg-turbo8-dev' has no installation candidate
#5 9.011 E: Unable to locate package python-is-python3
------
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     &&   apt-get update -qq     && apt-get install -y -q --no-install-recommends            libnlopt-dev            r-base            r-base-dev     && rm -rf /var/lib/apt/lists/*     &&   rPkgsInstall -pkgs ALL]: exit code: 100
stebo85 commented 1 year ago

Dear @andreifoldes,

Afni works best with fedora:35 as a base-image. It does not work with debian:buster-slim because libjpeg-turbo8-dev does not exist in debian (but it would work with ubuntu 18.04 - 22.04).

Here you can find an example how to build AFNI: https://github.com/NeuroDesk/neurocontainers/blob/master/recipes/afni/build.sh

You can also directly use the www.Neurodesk.org container of AFNI :)

andreifoldes commented 1 year ago

Roger that! I did find out about neurodesk over the weekend and it worked beautifully! ps.: Maybe its worth changing the AFNI example on the neurodocker website?