Not completed registration of two images with AntsRegistrationSyn - error line 639: 40 Killed

I am trying to register two images using AntsRegistrationSyn.sh using the Docker. This is the code I used:
antsRegistrationSyN -d 3 -f full_template_template0IT6grad025.nii.gz -m Syntemplate0.nii.gz -x TSEMASK_tentative.nii.gz -o TSE_movingto_mprage

It works everything perfectly fine till it executes the non-linear Syn transformation. I receive this error “1DIAGNOSTIC, 50, -3.995203152731e-01, 5.832434352740e-05, 3.6274e+03, 6.4870e+01, /opt/ants-2.5.0/bin/antsRegistrationSyN.sh: line 639: 40 Killed $COMMAND
Registration finished.” No output is saved. Any idea on how I should solve this? Should I change the number of threads? Is it a memory disk problem of my laptop?

Hi @mdagostini and welcome to neurostars!

Killed indicates a memory issue. What resources are you giving Docker?

Best,
Steven

Hi Steven, thanks a lot for your fast reply. Under containers, I see this info: 12 CPU and 15GB. Do you have any suggestion on how to change it?

There should be a panel in the docker desktop app settings where you can change the memory you are giving docker.

Sorry I meant what settings you would suggest to use (how many CPU, memory). I am very new in MRI and I am not familiar how much computational demanding these steps are. Thank you in advance

It depends on the size of the file you are processing, but for a standard T1w, 15GB should be more than enough. Are you sure what you listed are the resources being given to docker in the settings panel?

Hi Steven, thanks for your fast reply. I double checked and it seems that those are the resources. I ran again the command to double check the memory usage throughout registration and it seems memory is the problem.
image

If you think 15GB should be enough, why is taking so much resources? Is there anything I should change in my command: antsRegistrationSyN.sh -d 3 -f full_template_template0IT6grad025.nii.gz -m Syntemplate0.nii.gz -x TSEMASK_tentative.nii.gz -o TSE_movingto_mprage

Attached a screenshot with the size of the images and mask I am using for the registration.