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

Minimise freesurfer 7.1.1 - nu_correct not found #408

Closed
jakepalmer opened this issue Jun 24, 2021 · 2 comments
Closed

Minimise freesurfer 7.1.1 - nu_correct not found #408

jakepalmer opened this issue Jun 24, 2021 · 2 comments

Comments

@jakepalmer
Copy link

Freesurfer's nu_correct command isn't found when calling mri_nu_correct.mni while using neurodocker-minify. When mri_nu_correct.mni is called from inside the docker container without the minify command it completes without error. I've read a few other issues that relate to problems with perl (e.g. mentioned in #321 and #333).

Command to build:

docker run --rm repronim/neurodocker:master generate docker \
        --base=nvidia/cuda:9.1-base-ubuntu16.04 \
        --pkg-manager=apt \
        --freesurfer version=7.1.1 | docker build -t fs:test -

Then assuming license.txt and T1.nii.gz exist in $PWD:

cmd1="mri_convert /home/T1.nii.gz /home/T1.mgz"
cmd2="mri_nu_correct.mni --i /home/T1.mgz --o /home/T1_N3.mgz --n 2"

docker run --rm -itd \
    --name fs \
    --security-opt=seccomp:unconfined \
    -v ${PWD}:/home \
    -v ${PWD}/license.txt:/opt/freesurfer-7.1.1/license.txt \
    -e FS_LICENSE="/opt/freesurfer-7.1.1/license.txt" \
    fs:test

neurodocker-minify \
    --container fs \
    --dirs-to-prune /opt/freesurfer-7.1.1/ \
    --commands "$cmd1" "$cmd2"

Full output printed to terminal is in this text file, but important part seems to be:

[NEURODOCKER 2021-06-24 23:26:56,594 INFO]: /opt/freesurfer-7.1.1/bin/mri_nu_correct.mni
[NEURODOCKER 2021-06-24 23:26:56,621 INFO]: --i /home/T1.mgz --o /home/T1_N3.mgz --n 2
[NEURODOCKER 2021-06-24 23:26:56,674 INFO]: nIters 2
[NEURODOCKER 2021-06-24 23:26:56,732 INFO]: mri_nu_correct.mni 7.1.1
[NEURODOCKER 2021-06-24 23:26:56,782 INFO]: Linux f7a075905ebd 5.10.25-linuxkit #1 SMP Tue Mar 23 09:27:39 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
[NEURODOCKER 2021-06-24 23:26:56,843 INFO]: Thu Jun 24 13:26:56 UTC 2021
[NEURODOCKER 2021-06-24 23:26:57,065 INFO]: tmpdir is /home/tmp.mri_nu_correct.mni.114
[NEURODOCKER 2021-06-24 23:26:57,091 INFO]: nu_correct: Command not found.
[NEURODOCKER 2021-06-24 23:26:57,184 INFO]: /
[NEURODOCKER 2021-06-24 23:26:57,214 INFO]: mri_convert /home/T1.mgz /home/tmp.mri_nu_correct.mni.114/nu0.mnc -odt float
[NEURODOCKER 2021-06-24 23:26:57,363 INFO]: mri_convert /home/T1.mgz /home/tmp.mri_nu_correct.mni.114/nu0.mnc -odt float
[NEURODOCKER 2021-06-24 23:27:37,296 INFO]: reading from /home/T1.mgz...

minify.txt

Thanks for your help!

@sooyounga
Copy link
Collaborator

we didn't have the same issue when minify-ing, we ran into mri_convert issue however.
there's a new command for minify using neurodocker minify instead of neurodocker-minify:

neurodocker minify \
    --container fs \
    --dir /opt/freesurfer-7.1.1/ \
    "$cmd1" "$cmd2"

we used the base image as demian using this command:

neurodocker generate docker \
    --pkg-manager apt \
    --base-image debian:buster-slim \
    --freesurfer version=7.1.1 \
> freesurfer7.Dockerfile

since minify-cation was not proper, do you want to try this again using the base image we used and with the new command? the minify doesn't work as expected so we'll open a new issue

@djarecka
Copy link
Member

djarecka commented Sep 8, 2023

since we were not able to reproduce and there is no new comments, we will close it for now. feel free to reopen

@djarecka djarecka closed this as completed Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants