bids-apps / freesurfer

BIDS app wrapping recon-all from FreeSurfer
Apache License 2.0
40 stars 35 forks source link

WIP: Add Freesurfer 7 #67

Closed Shotgunosine closed 1 year ago

Shotgunosine commented 3 years ago

I added Freesurfer 7 and some additional jobs on circleci to test and deploy it. Circlci config will likely need to be fixed before this is complete.

Shotgunosine commented 1 year ago

I was able to get it to build with a local version of neurodocker that I added a mamba option to, and I've submitted a pull request for that: https://github.com/ReproNim/neurodocker/pull/562

edit: PR merged, I've updated the neurodocker version in the bash script accordingly.

Shotgunosine commented 1 year ago

@Remi-Gau I've got no idea why circle is trying to do anything with /home/circleci/license/license.txt (which is the source of the failure). As far as I can tell I've changed all references to that directory and the build ran past it when I changed the entry point to python. Do you have any ideas? I'm stumped.

Edit: Nevermind , figured it out.

Remi-Gau commented 1 year ago

Edit: Nevermind , figured it out.

🚀

Remi-Gau commented 1 year ago

will make a dummy change to retrigger circle ci

Remi-Gau commented 1 year ago

getting somse validator error: will bump its version

Remi-Gau commented 1 year ago

getting somse validator error: will bump its version

totally missed that you had done that and completely refactored the bash script: you've been busy

Shotgunosine commented 1 year ago

I had to bump the node version to get one that was available for ubuntu-jammy, so I went ahead and bumped the bids validator version to the latest. I had only bumped node to 16.x and the validator says it needs at least 18.x so I've bumped node to 18.x and we'll try again.

Shotgunosine commented 1 year ago

Bah, looks like circleci webhooks are broken at the moment. Is there anyone who can trigger a manual build?

Remi-Gau commented 1 year ago

Is there anyone who can trigger a manual build?

just did: let's see how this one goes

Remi-Gau commented 1 year ago

see if we can create specific dependencies between the steps of the circle ci so that test for fs6 starts when the build for fs6 is done.

Currently the tests can only start when both builds are done.

image

Shotgunosine commented 1 year ago

see if we can create specific dependencies between the steps of the circle ci so that test for fs6 starts when the build for fs6 is done.

Currently the tests can only start when both builds are done.

image

Yep, found the docs on matrix and they explain how to set it up. The circleci graph makes it looks like the dependencies are correct now.

Remi-Gau commented 1 year ago

Yep, found the docs on matrix and they explain how to set it up. The circleci graph makes it looks like the dependencies are correct now.

nice!!!

thanks for looking into this

Shotgunosine commented 1 year ago

@Remi-Gau, the tests are failing because they can't find anything at /home/circleci/data/ds114_test1_freesurfer_precomp_v6.0.0/00_group*. That part of the circleconfig predates this PR. Do you know what's going on with that?

Remi-Gau commented 1 year ago

get the same bug locally:

# get download script
wget https://raw.githubusercontent.com/bids-apps/maintenance-tools/main/utils/get_data_from_osf.sh

# get gata into home dir from https://osf.io/9q7dv/
bash get_data_from_osf.sh ds114_test1_freesurfer_precomp_v6.0.0 

# create target dir
mkdir -p ${HOME}/outputs1 ${HOME}/outputs2

# try to copy
sudo mv ${HOME}/data/ds114_test1_freesurfer_precomp_v6.0.0/00_group* ${HOME}/outputs1/

no group folder

$ ls ${HOME}/data/ds114_test1_freesurfer_precomp_v6.0.0/       

fsaverage  lh.EC_average  rh.EC_average  sub-01  sub-02

let me dig into the history of the repo to see what was happening in the good old days

Remi-Gau commented 1 year ago

here is the circle ci "step" that was used before I started working in the circle-ci:

https://github.com/bids-apps/freesurfer/blob/8c364a62ffbdef3b3e4f81a1c6bf4de5e9c2b5cd/.circleci/config.yml#L66C67-L66C67

more readable

docker run -ti --rm --read-only \
  -v ~/license/license.txt:/license.txt \
  --tmpfs /tmp --tmpfs /var/tmp \
  -v ${HOME}/data/ds114_test1:/bids_dataset \
  -v ${HOME}/data/ds114_test1_freesurfer_precomp_v6.0.0:/outputs \
    bids/${CIRCLE_PROJECT_REPONAME} /bids_dataset /outputs group2 \
      --license_file=/license.txt && \
mkdir -p ${HOME}/outputs1/ && \
sudo mv ${HOME}/data/ds114_test1_freesurfer_precomp_v6.0.0/00_group* ${HOME}/outputs1/ && \
cat ${HOME}/outputs1/00_group2_stats_tables/lh.aparc.thickness.tsv && \
cat ${HOME}/outputs1/00_group2_stats_tables/euler.tsv
Remi-Gau commented 1 year ago

I think I it is "just" a path issue: trying to fix in https://github.com/bids-apps/freesurfer/pull/67/commits/765a747844da7745a49b19c1087a8098ce213589

Shotgunosine commented 1 year ago

@Remi-Gau, it passed! Is there anything else we should fix for this PR?

Remi-Gau commented 1 year ago

woohoo!!!

I will merge and make a new release: this should trigger a push to docherhub.

bpinsard commented 1 year ago

Wow, glad my ping triggered a new release! Thanks for all the hard work! Waiting on the dockerhub push and will make a PR to repronim, can't wait to try it out!

Remi-Gau commented 1 year ago

Wow, glad my ping triggered a new release! Thanks for all the hard work! Waiting on the dockerhub push and will make a PR to repronim, can't wait to try it out!

FYI it is already on dockerhub but it is a bit of a mess at the moment:

see here https://github.com/bids-apps/freesurfer/issues/75#issuecomment-1699911795

any thoughts on what would make most sense for users?