Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ANTS with source needs little update #441

Open
Brainarea opened this issue Mar 16, 2022 · 5 comments
Open

ANTS with source needs little update #441

Brainarea opened this issue Mar 16, 2022 · 5 comments
Labels

Comments

@Brainarea
Copy link

Brainarea commented Mar 16, 2022

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!

@kaczmarj
Copy link
Collaborator

thanks @Brainarea ! so the change would be to add

git config --global url."https://".insteadOf git://

to the source instructions?

@Brainarea
Copy link
Author

thanks @Brainarea ! so the change would be to add

git config --global url."https://".insteadOf git://

to the source instructions?

Correct!

@Remi-Gau Remi-Gau added the ANTs label Mar 13, 2023
@github-actions
Copy link

github-actions bot commented Sep 8, 2023

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Sep 8, 2023
Copy link

This issue was closed because it has been inactive for 14 days since being marked as stale.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 12, 2023
@Remi-Gau
Copy link
Collaborator

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

@Remi-Gau Remi-Gau reopened this Nov 12, 2023
@Remi-Gau Remi-Gau removed the stale label Nov 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants