I'm working on a Docker image for one of our pipelines. Pydeface is one of the tools in the chain. It depends on FSL. The complete FSL installation is time consuming and the resulting image is large. Pydeface seems to use only FLIRT binary out of many FSL tools. I managed to compile FLIRT from sources in my Docker image. The FLIRT binary is only 1MB large + its dependencies.
According to the documentation, fsl binary is just a menu:
To bring up a simple GUI which is just a menu of the main individual FSL GUI tools, just type fsl.
The following lines allowed me to successfully install and execute pydeface with only flirt binary.
RUN pipx install pydeface
RUN sed -i "s/shutil.which('fsl')/shutil.which('flirt')/g" /root/.local/pipx/venvs/pydeface/lib/python3.11/site-packages/pydeface/utils.py
I'm working on a Docker image for one of our pipelines. Pydeface is one of the tools in the chain. It depends on FSL. The complete FSL installation is time consuming and the resulting image is large. Pydeface seems to use only FLIRT binary out of many FSL tools. I managed to compile FLIRT from sources in my Docker image. The FLIRT binary is only 1MB large + its dependencies.
Unfortunately, pydeface is looking for the
fsl
binary and notflirt
and I fail to execute it. Are there more dependencies than FLIRT from the FSL tools? Could the check be simply substituted withflirt
?According to the documentation,
fsl
binary is just a menu:The following lines allowed me to successfully install and execute pydeface with only
flirt
binary.