After installing the necessary dependencies, you
will need to clone this repository from GitHub and move into the Enigma-PD-WML
directory:
git clone https://github.com/UCL-ARC/Enigma-PD-WML.git
cd Enigma-PD-WML
You can build the image with the following command:
cd Enigma-PD-WML
docker build -f Dockerfile -t enigma-pd-wml .
If you want to run the container via Apptainer, you can convert this Docker image into an Apptainer one via:
docker image save enigma-pd-wml -o enigma-pd-wml.tar
apptainer build enigma-pd-wml.sif docker-archive:enigma-pd-wml.tar
After building the Docker image, you can run a container based on this local image:
docker run -v "${PWD}"/data:/data enigma-pd-wml
Note, this requires your BIDS data is stored in the directory Enigma-PD-WML/data
.
After building the Apptainer image, you can run a container based on this local image:
apptainer run --bind "${PWD}"/data:/data enigma-pd-wml.sif
Note, this requires your BIDS data is stored in the directory Enigma-PD-WML/data
, and that enigma-pd-wml.sif
is in the Enigma-PD-WML
directory.
This repository has a github actions workflow to automate uploading to Docker Hub when a new release is made on github.
-
Go to the releases tab and click 'Draft a new release'.
-
Click 'Choose a tag' and enter a new version number e.g.
v1.0.0
-
Click 'Generate release notes'. This will add a summary of any commits since the last release.
-
Click the green 'Publish release' button at the bottom left.
-
This will trigger the action to run and upload the code on the
main
branch to Docker Hub and Sylabs Cloud. Note: as the images are very large, this will take a while! (around 40 minutes)
This repository has another github actions workflow to run various linting checks on pull requests / commits to main
.
This uses pre-commit
, a python based tool. The enabled checks can be seen/updated in the
pre-commit configuration file.
Some of the main ones used are:
- hadolint: for linting Dockerfiles
- shellcheck: for linting shell scripts
It can be useful to run pre-commit
locally to catch issues early. To do so, you will need to have python installed
locally (for example, by installing Miniforge or similar)
Then run:
pip install pre-commit
Then (from inside a local clone of this github repository), run:
pre-commit install
pre-commit
should now run automatically every time you git commit
, flagging any issues.
There are two main components to the Dockerfile:
- The requirements for UNets-pgs
- The requirements for FSL
All requirements for the UNets-pgs workflow come from the base pgs image, including the bash script and packages like tensorflow.
FSL is installed as detailed in their installation docs
and configuration docs. We're using the -V
option at
the end of the fslinstaller
command to fix it to a specific FSL version
.