ReproNim / neurodocker

Generate custom Docker and Singularity images, and minimize existing containers
https://www.repronim.org/neurodocker/
Apache License 2.0
327 stars 97 forks source link

Error when trying to add output filename during generate docker command #596

Closed switt4 closed 8 months ago

switt4 commented 9 months ago

Hi,

I am getting an error when I try to run the below command to generate a docker container and have the output written to a Dockerfile. neurodocker seems to be interpreting the output filename as an additional option to the previous line. I'm not sure why this isn't working, as it follows exactly the freesurfer example in the documentation. There doesn't appear to be an option in the neurodocker generate command to specify an output filename, so I don't know if I am missing something?

docker run repronim/neurodocker generate docker \     
--pkg-manager apt \
--base-image debian:bullseye-slim \
--freesurfer version=7.2.0 \
Dockerfile  

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Usage: neurodocker generate docker [OPTIONS]
Try 'neurodocker generate docker --help' for help.

Error: Invalid value for '--freesurfer': expected string in format 'key=value'   

Thanks! Suzanne

stebo85 commented 9 months ago

Dear @switt4,

It seems you are potentially missing the output redirection operator >:

This might work:

docker run repronim/neurodocker generate docker \     
--pkg-manager apt \
--base-image debian:bullseye-slim \
--freesurfer version=7.2.0 \
> Dockerfile  

Also, it looks like you are trying to build this on an ARM processor (e.g. Apple silicon). This might work, but it could be quite slow to build. Make sure to activate Rosetta 2 support in Docker to speed up the build.

Further, if you just want FreeSurfer 7.2.0 in an image, it might be quicker to use already built and tested www.Neurodesk.org images:

I hope this helps Kind regards Steffen

Remi-Gau commented 8 months ago

@switt4 I will assume this solved your issue but reopen if that was not the case. 😉