-
Notifications
You must be signed in to change notification settings - Fork 28
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
enh: docker support + basic usage doc #13
Conversation
There are two implementations of docker files for PALM, made by two different contributors. This by Joke is one. Then there is another. I can merge but then someone else would need offer support as I haven't tested either, nor do I use docker/singularity in general... |
Dockerfile
Outdated
WORKDIR fileio | ||
RUN cd \@gifti/private \ | ||
&& mkoctfile --mex zstream.c \ | ||
&& mkoctfile --mex miniz.c \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mini.z is a single-file library that is included in zstream.c so it doesn't have to be compiled separately (and it does not contain a MEX interface).
Hi Anderson - I wanted to share the Dockerfile I used to help others trying to easily install/use this nice software. Sure, I can provide basic support if people run into issues with the image. Ideally, we could also build this and host it on docker hub (where users would just be able to pull the image from the registry) - I'm currently hosting one at ( |
Hi Mathias, This is great, many thanks. May ask you a final favour before merging? We have now 3 docker files. They are similar but not the same. Any chance you could see what pieces from the other two may be absent from yours, then include them if you find these are needed? The three are these:
I didn't want to undo their work, but at the same time, didn't want to have multiple Docker files that the users won't know which to use. What do you think? Thanks! Anderson |
Hi Anderson - some differences I've observed between the Dockerfiles:
In the end, all these Dockerfiles achieve the same goal - providing users with a prebuilt recipe to easily use PALM. |
Thanks Mathias. FSL isn't needed. Connectome Workbench and FreeSurfer are only needed to read files that the user may have from these programs, but then I think it's fair to assume that the user will have these installed anyway in that case, so I think I'd drop these too. As long as Octave works, along with signal and image toolboxes and their dependencies, plus we have what is needed to compile the .c files, we should be good. Thanks! |
Ah, in that case we may want to consider include FreeSurfer as well - the goal of the container is to have all dependencies (and preferably use-cases) bundled within this execution environment. |
However way you prefer and will facilitate the life for Docker users... |
@andersonwinkler After thinking on this a little more, would it be possible now to phase out the need for FreeSurfer with the update in d3afc0b? (@gllmflndn does @-gifti now support r/w of FS surfs and curvs?) If so, it would be great for reducing the size of this container! |
@mgxd reading FS files should be supported, see: |
@gllmflndn - amazing! I believe these lines are the specific files currently written with FS - there is no necessity to replace but would be nice to knock out a (~ 6GB) dependency. |
@mgxd I have added export to FS |
@gllmflndn - I note you added mz3 reading. Would it be possible to also include mz3 write - Matlab code is here. I am biased as it is the internal format of Surfice, but this is a compact, simple, and fast format. While some might argue this is yet another format, this format is structured just like OpenGL/Metal/DirectX/Vulkan indexed triangles. So the format is defined by the hardware providing very good performance. The full format specification is here which includes a Python reader (in the form of a Blender plugin). Thanks for your great work. |
@neurolabusc - ok, it might require more testing but I've added it now. It will be in the next release of SPM12 and I will update @gifti at that time. |
This is great!
Yes... particularly for .mgh/.mgz files. The outputs of the FreeSurfer's command However, including ~6 GB additional files to a container just because of a few lines of code don't seem reasonable. If Guillaume could integrate .mgz/.mgh into @nifti (these are volume formats, one the gzipped version of the other) it would be awesome. Alternatively, I can write small functions to do that. |
Weirdly enough, I seem to have implemented reading from .mgh files in @gifti: |
Hi @andersonwinkler + @mgxd, I'm using a singularity container of PALM pulled from here and when I try to run it, I keep getting these errors: _X11 connection rejected because of wrong authentication. _ & _Error using palm_configrw (/opt/palm/palm_configrw.m:61) Error in palm_takeargs (/opt/palm/palm_takeargs.m:54->palm_configrw) I'm uncertain if this is a problem with my inputs, or perhaps design or contrast matrices or with the container itself. I am using a design and contrast matrix that worked when I did not run it in a singularity container so I would imagine they should be okay. Thank you very much! This is the PALM function: palm_command1() { |
Hi @hajernakua, Can you try outside a container? It's hard to tell otherwise if the problem is with the container or with PALM itself. Seems you don't have access to a graphical mode, but PALM doesn't need one. Perhaps if you edit the 'palm' script so as to include the option --no-gui? All the best, Anderson |
Thank you for the reply @andersonwinkler (@mgxd) , I moved all my data to a computing cluster which doesn't have PALM and that's why I would need to run it in a container. When I ran palm prior to moving my data, it worked fine, but I'm just adjusting the commands and scripts to this container. I found previous error that was similar to mine, and made some script adjustments, and this is my first command: palm_command1() { However, I'm still getting this error: Running PALM alpha115 using Octave 4.0.3 with the following options: Error in gifti (/opt/palm-alpha115/fileio/@gifti/gifti.m:89->read_gifti_file) Would you know a way to help solve this problem? |
Hi Two possibilities:
In any case, PALM is meant to depend only on Octave, so I really don't see much benefit in using a container. I wouldn't use and wouldn't recommend (and wouldn't recommend containers in general...). Cheers, Anderson |
To get a more detailed error message, you could remove the try/catch here: The MEX files should have been compiled through the instructions within the |
Adds Dockerfile with support for NIFTI, CIFTI, GIFTI and example usage
Will close if #5 is merged, but it seems orphaned