Neurodocker build issues with AFNI

I’m trying to build a docker image using Neurodocker. Ultimate goal is to have a stable interface with FSL and AFNI using Jupyter.

My dockerfile generation:

neurodocker generate docker
–pkg-manager apt
–base-image debian:buster-slim --fsl version=6.0.4 --afni method=binaries version=latest
–miniconda version=latest conda_install=“matplotlib notebook numpy pandas seaborn nipype”
–user nonroot
–workdir /work > notebook.Dockerfile

This will execute successfully, then I try the build:

docker build --platform=linux/x86_64 --tag notebook_afni_fsl --file notebook.Dockerfile .

I’m using an M1 Mac so miniconda will not install without the --platform. It appears to fail on the AFNI install thought I can’t understand the error:

#6 55.60 Downloading AFNI …
#6 55.65 % Total % Received % Xferd Average Speed Time Time Time Current
#6 55.65 Dload Upload Total Spent Left Speed
31 1079M 31 342M 0 0 2224k 0 0:08:17 0:02:37 0:05:40 0
#6 213.3 curl: (56) OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 104
#6 213.3
#6 213.3 gzip: stdin: unexpected end of file
#6 213.3 /bin/tar: Unexpected EOF in archive
#6 213.3 /bin/tar: Unexpected EOF in archive
#6 213.3 /bin/tar: Error is not recoverable: exiting now


“executor failed running [/bin/sh -c apt-get update -qq && apt-get install -y -q --no-install-recommends ca-certificates curl ed gsl-bin libgl1-mesa-dri libglib2.0-0 libglu1-mesa-dev libglw1-mesa libgomp1 libjpeg62 libxm4 multiarch-support netpbm 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


I did try using the same dockerfile generation above, but removing afni - that build was created successfully. Please let me know if there’s anything obviously wrong, I was just trying to follow the examples between Neurodocker and Nipype (however there is some conflicting info here, as a lot of the Nipype tutorials point to an older version of Neurodocker). The base image for the docker is not really important for me (or at least not now). I did try with ubuntu and another version of debian with no luck.