neurodocker
neurodocker copied to clipboard
ANTS with source needs little update
I was trying to install ANTS through sources and it was giving me the following error: "The unauthenticated git protocol on port 9418 is no longer supported"
I found out that git requires a change in the default url and this is easily done with a git config command.
This is the code that works for me for installing ANTS with source:
ENV ANTSPATH="/opt/ants-latest/bin"
PATH="/opt/ants-latest/bin:$PATH"
LD_LIBRARY_PATH="/opt/ants-latest/lib:$LD_LIBRARY_PATH"
RUN apt-get update -qq
&& apt-get install -y -q --no-install-recommends
cmake
g++
gcc
git
make
zlib1g-dev
&& apt-get clean
&& rm -rf /var/lib/apt/lists/*
&& mkdir -p /tmp/ants/build
&& git config --global url."https://".insteadOf git://
&& git clone https://github.com/ANTsX/ANTs.git /tmp/ants/source
&& cd /tmp/ants/build
&& cmake -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF /tmp/ants/source
&& make -j1
&& mkdir -p /opt/ants-latest
&& mv bin lib /opt/ants-latest/
&& mv /tmp/ants/source/Scripts/* /opt/ants-latest/bin
&& rm -rf /tmp/ants
Hope this helps!
thanks @Brainarea ! so the change would be to add
git config --global url."https://".insteadOf git://
to the source instructions?
thanks @Brainarea ! so the change would be to add
git config --global url."https://".insteadOf git://
to the source instructions?
Correct!
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
Still valid but for a different reason.
Copy from run: https://github.com/ReproNim/neurodocker/actions/runs/6713805023/job/18246021919
Seems that it is not on our side though. Would have to dig into the install doc of ANTs.
#5 33.94 [ 5%] Creating directories for 'ITKv5'
#5 34.02 [ 11%] Performing download step (git clone) for 'ITKv5'
#5 34.04 Cloning into 'ITKv5'...
#5 164.1 fatal: unable to connect to github.com:
#5 164.1 github.com[0: 140.82.113.3]: errno=Connection timed out
#5 164.1
#5 164.1 Cloning into 'ITKv5'...
#5 295.1 fatal: unable to connect to github.com:
#5 295.1 github.com[0: 140.82.114.4]: errno=Connection timed out
#5 295.1
#5 295.1 Cloning into 'ITKv5'...
#5 426.2 fatal: unable to connect to github.com:
#5 426.2 github.com[0: 140.82.113.4]: errno=Connection timed out
#5 426.2
#5 426.2 CMake Error at ITKv5-prefix/tmp/ITKv5-gitclone.cmake:31 (message):
#5 426.2 Failed to clone repository:
#5 426.2 'git://github.com/InsightSoftwareConsortium/ITK.git'
#5 426.2
#5 426.2
#5 426.2 -- Had to git clone more than once:
#5 426.2 3 times.
#5 426.2 make[2]: *** [CMakeFiles/ITKv5.dir/build.make:98: ITKv5-prefix/src/ITKv5-stamp/ITKv5-download] Error 1
#5 426.2 make[1]: *** [CMakeFiles/Makefile2:85: CMakeFiles/ITKv5.dir/all] Error 2
#5 426.2 make: *** [Makefile:121: all] Error 2
#5 ERROR: process "/bin/sh -c apt-get update -qq && apt-get install -y -q --no-install-recommends ca-certificates cmake g++ gcc git make zlib1g-dev && rm -rf /var/lib/apt/lists/* && mkdir -p /tmp/ants/build && git clone https://github.com/ANTsX/ANTs.git /tmp/ants/source && cd /tmp/ants/source && git fetch --tags && git -c advice.detachedHead=false checkout v2.3.0 && cd /tmp/ants/build && cmake -DCMAKE_INSTALL_PREFIX=/opt/ants-2.3.0 -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF /tmp/ants/source && make -j1 && mkdir -p /opt/ants-2.3.0 && if [ -d ANTS-build ]; then cd ANTS-build && make install && mv ../../source/Scripts/ /opt/ants-2.3.0; else mv bin lib /opt/ants-2.3.0/ mv ../Scripts/* /opt/ants-2.3.0 ; fi && rm -rf /tmp/ants" did not complete successfully: exit code: 2
------
> [2/3] RUN apt-get update -qq && apt-get install -y -q --no-install-recommends ca-certificates cmake g++ gcc git make zlib1g-dev && rm -rf /var/lib/apt/lists/* && mkdir -p /tmp/ants/build && git clone https://github.com/ANTsX/ANTs.git /tmp/ants/source && cd /tmp/ants/source && git fetch --tags && git -c advice.detachedHead=false checkout v2.3.0 && cd /tmp/ants/build && cmake -DCMAKE_INSTALL_PREFIX=/opt/ants-2.3.0 -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF /tmp/ants/source && make -j1 && mkdir -p /opt/ants-2.3.0 && if [ -d ANTS-build ]; then cd ANTS-build && make install && mv ../../source/Scripts/ /opt/ants-2.3.0; else mv bin lib /opt/ants-2.3.0/ mv ../Scripts/* /opt/ants-2.3.0 ; fi && rm -rf /tmp/ants:
426.2 CMake Error at ITKv5-prefix/tmp/ITKv5-gitclone.cmake:31 (message):
426.2 Failed to clone repository:
426.2 'git://github.com/InsightSoftwareConsortium/ITK.git'
426.2
426.2
426.2 -- Had to git clone more than once:
426.2 3 times.
426.2 make[2]: *** [CMakeFiles/ITKv5.dir/build.make:98: ITKv5-prefix/src/ITKv5-stamp/ITKv5-download] Error 1
426.2 make[1]: *** [CMakeFiles/Makefile2:85: CMakeFiles/ITKv5.dir/all] Error 2
426.2 make: *** [Makefile:121: all] Error 2