neuropoly / intranet.neuro.polymtl.ca

NeuroPoly's lab manual
https://intranet.neuro.polymtl.ca
4 stars 6 forks source link

ANTs installation instructions: missing ccmake #88

Open mathieuboudreau opened 1 year ago

mathieuboudreau commented 1 year ago

I'm following the ANTs installation instructions described here: https://github.com/neuropoly/intranet.neuro.polymtl.ca/blob/31ebc934cf65605122416c678b65761ae816c048/geek-tips/image-processing-software/advanced-normalization-tools-ants.md

on my account on bireli.

This line,

Once you've compiled the binaries, you can copy the bin folder and the lib folder here: /usr/local/ants/.

implies that one needs to compile from source. But the linux instructions ("Run CMake to configure the build" section of https://github.com/ANTsX/ANTs/wiki/Compiling-ANTs-on-Linux-and-Mac-OS) uses the command ccmake, which isn't available on bireli. Anyone has a hint on how to get around this, so that we can update our intranet instructions? Ainsleigh Hill (@ahill187) wrote these instructions, but I don't think she's in the lab anymore.

mathieuboudreau commented 1 year ago

This line is also not possible,

Once you’ve compiled the binaries, you can copy the bin folder and the lib folder here: /usr/local/ants/.

because users don't have permission to make a dir there.

------@bireli:~/ants-binary$ ls /usr/local/
bin  etc  games  include  lib  man  miniforge3  sbin  share  src
------@bireli:~/ants-binary$ mkdir /usr/local/ants/
mkdir: impossible de créer le répertoire «/usr/local/ants/»: Permission non accordée
------@bireli:~/ants-binary$ 
mathieuboudreau commented 1 year ago

So I looked into it and the Ubuntu version we're using on bireli (for now) matches exactly one of the versions the ants devs provided a compiled version for with their latest release.

------@bireli:~/install-ants/build$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"

Matches ants-2.4.2-ubuntu-22.04-X64-gcc.zip here: https://github.com/ANTsX/ANTs/releases for release v2.4.2

Installing it,

wget https://github.com/ANTsX/ANTs/releases/download/v2.4.2/ants-2.4.2-ubuntu-22.04-X64-gcc.zip
unzip ants-2.4.2-ubuntu-22.04-X64-gcc.zip 
export PATH="[FULL PATH]/ants-binary/ants-2.4.2/bin:$PATH"
export ANTSPATH="[FULL PATH]/ants-binary/ants-2.4.2/bin"

worked and was able to replicate a session I ran on my local laptop.

Adding instructions to use a compiled version would be easy, and although it may not always work, would be an improvement over the current instructions that are broken / missing info. Also I'm sure SCT pros might be able to suggest alternate or better solutions for compiling it since it appears to be a dependency (https://github.com/spinalcordtoolbox/spinalcordtoolbox/blob/a0dce2c9cdb4923317714ae4d6033268961c6faf/testing/dependencies/test_ants.py), I just couldn't find where/how it was installed through quick ants searches in their repo.