AFNI docker build fails
See original GitHub issueneurodocker 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?
Issue Analytics
- State:
- Created 10 months ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Can not build AFNI using Neurodocker · Issue #98 - GitHub
Hi: I am getting the following error during the build of AFNI using a dockerfile generated by neurodocker: configure: Need to download and...
Read more >AFNI Docker container not working
Hi all! I'm trying to run AFNI within a Docker container. I start the container with this command: "docker run -it --rm afni/afni:latest"....
Read more >Previously working Neurodocker image failing - Neurostars
I've tried to debug this, reseting Docker to factory defaults, trying a different Neurodebian build (trust-non-free, instead of stretch-non-free ...
Read more >Docker File Non-Zero Code 100 Error When Building
This is a prebuilt docker file from a repository for neuroimaging, so I would figure that it would work. Is this something wrong...
Read more >neurodocker - PyPI
software argument description
AFNI version* latest
install_path Installation path. Default /opt/afni‑ .
install_r If true, install R.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
When I am removing
&& \
from line 43here is the error I get
Debian does not have libjpeg-turbo8-dev and multiarchsupport multiarch issue neurodocker
debian packages it has libjpeg62-turbo-dev
Dear @spurani and @anandsaini024
can you try this:
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):
Thank you Steffen