neurodocker
neurodocker copied to clipboard
Multi-arch support problem for recent Linux distro (potential solution included)
When one is trying to install AFNI (not sure if issue is there for other packages) with a recent distribution (above debian:stretch) like this:
docker run --rm repronim/neurodocker:master generate docker \
--base debian:bullseye --pkg-manager apt \
--afni version=latest method=binaries install_python3=true install_python2=true \
Then a multiarch-support error appears because the package is no longer supported. Multiarch-support is needed for the installation of libxp6 and libpng12. I found a workaround, not sure if it is viable on a long-term base. I removed multiarch-support from the list of packages downloaded with apt-get and added a manual download and install before the installatino of libxp6 and libpng12. So for AFNI this is what i get:
ENV PATH="/opt/afni-latest:$PATH" \
AFNI_PLUGINPATH="/opt/afni-latest"
RUN apt-get update -qq \
&& apt-get install -y -q --no-install-recommends \
ed \
gsl-bin \
libglib2.0-0 \
libglu1-mesa-dev \
libglw1-mesa \
libgomp1 \
libjpeg62 \
libxm4 \
netpbm \
python \
python3 \
tcsh \
xfonts-base \
xvfb \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& curl -sSL --retry 5 -o /tmp/toinstall.deb http://ftp.br.debian.org/debian/pool/main/g/glibc/multiarch-support_2.28-10_amd64.deb \
&& apt-get update \
&& dpkg -i /tmp/toinstall.deb \
&& rm /tmp/toinstall.deb \
&& curl -sSL --retry 5 -o /tmp/toinstall.deb http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb \
&& apt-get update \
&& dpkg -i /tmp/toinstall.deb \
&& rm /tmp/toinstall.deb \
&& curl -sSL --retry 5 -o /tmp/toinstall.deb http://snapshot.debian.org/archive/debian-security/20160113T213056Z/pool/updates/main/libp/libpng/libpng12-0_1.2.49-1%2Bdeb7u2_amd64.deb \
&& dpkg -i /tmp/toinstall.deb \
&& rm /tmp/toinstall.deb \
&& apt-get install -f \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& gsl2_path="$(find / -name 'libgsl.so.19' || printf '')" \
&& if [ -n "$gsl2_path" ]; then \
ln -sfv "$gsl2_path" "$(dirname $gsl2_path)/libgsl.so.0"; \
fi \
&& ldconfig \
&& echo "Downloading AFNI ..." \
&& mkdir -p /opt/afni-latest \
&& curl -fsSL --retry 5 https://afni.nimh.nih.gov/pub/dist/tgz/linux_openmp_64.tgz \
| tar -xz -C /opt/afni-latest --strip-components 1
I hope this helps.
I can confirm this. It also happens with SPM12 and Ubuntu 22.04:
generate_docker() {
docker run -i --rm repronim/neurodocker:0.9.4 generate docker \
--base-image ubuntu:22.04 \
--pkg-manager apt \
--install opts="--quiet" \
gcc \
g++ \
octave \
--spm12 version=r7771 \
--freesurfer version=7.1.1 \
--copy $conda_yml_file /tmp/ \
--miniconda \
version=latest \
yaml_file=/tmp/$conda_yml_file \
env_name=csp \
--run 'mkdir /code && chmod 777 /code && chmod a+s /code' \
--run 'mkdir /data && chmod 777 /data && chmod a+s /data' \
--run 'mkdir /output && chmod 777 /output && chmod a+s /output' \
--run 'mkdir ~root/.jupyter' \
--run 'echo c.NotebookApp.ip = \"0.0.0.0\" > ~root/.jupyter/jupyter_notebook_config.py' \
--run 'echo c.NotebookApp.allow_root=True >> ~root/.jupyter/jupyter_notebook_config.py' \
--run 'echo source activate csp >> ~root/.bashrc' \
--workdir '/code'
}
E: Unable to locate package multiarch-support
The command '/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' returned a non-zero code: 100
@kaczmarj - @sooyounga and I thinking about working on this, but would need some help. Would you just change the afni and spm templates? Do you have a syntax for checking the distribution?
@djarecka - that's great. what do you want me to update in the afni and spm templates?
Do you have a syntax for checking the distribution?
the linux distribution, like ubuntu or debian or centos etc? this info is in /etc/os-release
:
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux bookworm/sid"
NAME="Debian GNU/Linux"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/
for centos it would like like this:
$ cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
@kaczmarj - so it looks like for some distribution multiarch-support
can't be installed using apt-get
but had to be directly downloaded (see the first post). Therefore, I assumed that the templates have to be changed.
I was also wondering if you have syntax for providing slightly different template for different linux distribution.
this is a tricky one. i wonder if we could simply remove multiarch-support from the list of dependencies and test that afni still works. the other dependencies would pull in multiarch-support if they needed it.
at the moment, there is no way of providing different templates for different linux distributions.
libxp6
no longer appears to be accessible at http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb.
Does anyone have a workaround?
This issue is stale because it has been open for 30 days with no activity.
I think it's safe to remove multiarch from these recipes because they are not needed anymore - has anyone else tested this and can confirm?
This issue is stale because it has been open for 30 days with no activity.