-
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
FROM neurodebian:stretch | ||
|
||
ARG DEBIAN_FRONTEND="noninteractive" | ||
|
||
RUN apt-get update -qq && apt-get install -y --no-install-recommends less \ | ||
ca-certificates \ | ||
wget \ | ||
unzip \ | ||
octave \ | ||
octave-general \ | ||
octave-signal \ | ||
octave-image \ | ||
liboctave-dev \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
# download HCP workbench (1.3.0) for CIFTI support | ||
WORKDIR /opt | ||
RUN wget -q https://ftp.humanconnectome.org/workbench/workbench-linux64-v1.3.0.zip -O wb.zip \ | ||
&& unzip wb.zip \ | ||
&& rm wb.zip | ||
|
||
# copy repo into /opt/palm | ||
WORKDIR palm | ||
COPY . . | ||
|
||
# recompile mex files to be compatible with our system | ||
WORKDIR fileio | ||
RUN cd \@gifti/private \ | ||
&& mkoctfile --mex zstream.c \ | ||
&& mkoctfile --mex miniz.c \ | ||
&& cd ../../\@xmltree/private \ | ||
&& mkoctfile --mex xml_findstr.c \ | ||
&& cd ../../\@file_array/private \ | ||
&& mkoctfile --mex file2mat.c \ | ||
&& mkoctfile --mex mat2file.c | ||
|
||
# add palm and workbench to our PATH | ||
ENV PATH=/opt/palm:/opt/workbench/bin_linux64:$PATH | ||
|
||
# enter with call to palm executable | ||
WORKDIR /working | ||
ENTRYPOINT ["palm"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,23 @@ | ||
To learn about PALM, please visit **http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/PALM** | ||
|
||
On the link above there is no history about the package itself, so here it goes some. In one way or another, work on a permutation tool has been ongoing for a while, with some of the functions having been loosely written back in 2008, if not earlier. These functions began to be assembled and integrated by mid-2013. Between Oct/2013 and Mar/2014, Git was used locally for version control, but eventually PALM went on without it. Various early alpha versions circulated to collaborators, with the first public release in late Feb/2015 in the FSL website. These releases were, and continue to be, in the form of tarballs. Since all were kept, it was easy to retroactively apply the commits to the same local repository that had been neglected, and finally make it public on GitHub today, 04/Jul/2015. | ||
|
||
|
||
---- | ||
|
||
### Docker usage | ||
|
||
[Docker](https://www.docker.com/get-started) is an application that allows encapsulation of software environments. These environments are referred to as `containers` and `images`. [Click here](https://docs.docker.com/get-started/#containers-and-virtual-machines) for more information on Docker. | ||
|
||
##### Build | ||
PALM includes a `Dockerfile` with instructions to build the image. | ||
|
||
1) Clone (`git clone`) or download this repository. | ||
2) `cd` into this repo and run `docker build --rm -t mypalm .` | ||
|
||
##### Usage | ||
Once you have built (or pulled) the image, you can run it with local data. You can pass local directories into docker containers using the `-v` flag. Here's an example command for running PALM: | ||
|
||
```bash | ||
docker run --rm -it -v /path/to/my/data:/data mypalm -i /data/mydata.nii -d /data/design.mat -t /data/design.con | ||
``` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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).