Skip to content
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: Add initial FastSurfer interface (WIP) #280

Draft
wants to merge 234 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 198 commits
Commits
Show all changes
234 commits
Select commit Hold shift + click to select a range
f8972da
Initial recipe change to include FastSurfer (GPU) support
pcamach2 Feb 15, 2022
1377f4c
Added function to test for FastSurfer files in --fs-subjects-dir
pcamach2 Apr 20, 2022
9b6251f
Add logger for FastSurfer check
pcamach2 Apr 23, 2022
f301f3a
Add quick fix check for FastSurfer
pcamach2 Apr 23, 2022
f90738a
Removes fastsurfer_bool
pcamach2 Apr 23, 2022
42e6456
Add FastSurfer argument to
pcamach2 Apr 24, 2022
7502350
Add FastSurfer citations
pcamach2 Apr 24, 2022
4cf37e5
Add FastSurfer
pcamach2 Apr 24, 2022
c8d0493
Add FastSurfer python wrapper
pcamach2 Apr 26, 2022
3169bc7
Update .zenodo.json
pcamach2 Apr 26, 2022
d596955
Fix typo
pcamach2 Apr 26, 2022
8feb172
Removes fastsurfer_bool for Flake8 check
pcamach2 Apr 26, 2022
94f962a
Update misc.py
pcamach2 Apr 26, 2022
94d952a
Update fastsurfer.py
pcamach2 Apr 26, 2022
7f9fe47
Update anatomical.py
pcamach2 Apr 26, 2022
55ea6b0
Update .zenodo.json
pcamach2 Apr 26, 2022
4c6828a
Update run.py
pcamach2 Apr 26, 2022
c77ed1d
Update misc.py
pcamach2 Apr 26, 2022
595b001
Address PEP8
pcamach2 Apr 26, 2022
86edc27
Update formatting for PEP8 compliance
pcamach2 Apr 26, 2022
a7c4aa6
Fix formatting for PEP8 compliance
pcamach2 Apr 26, 2022
b5cf10a
Fix formatting for PEP8 compliance
pcamach2 Apr 26, 2022
a93fd77
Fix formatting for PEP8 compliance
pcamach2 Apr 26, 2022
41cfba6
Fix typo
pcamach2 Apr 26, 2022
8f821d2
Revert Convert3D install method from development use case
pcamach2 Apr 26, 2022
e338001
Fix Convert3D
pcamach2 Apr 27, 2022
16d5f09
Pin Jinja2 version to prevent CircleCI build_docs failure
pcamach2 Apr 27, 2022
6973ddd
Fix docstring
pcamach2 Apr 27, 2022
d35eb07
Update example of commandline FastSurfer usage to docstring
pcamach2 Apr 27, 2022
1acc95f
Fix docstring formatting
pcamach2 Apr 27, 2022
a0e2c71
Update fastsurfer.py
pcamach2 Apr 27, 2022
609d00c
Update fastsurfer.py
pcamach2 Apr 27, 2022
6768242
Update fastsurfer.py
pcamach2 Apr 27, 2022
62ffc16
Fix docstrings formatting
pcamach2 Apr 27, 2022
1c55f0d
Update fastsurfer.py
pcamach2 Apr 27, 2022
d0f0f5d
Update fastsurfer.py
pcamach2 Apr 27, 2022
b65c03d
Add code block
pcamach2 Apr 27, 2022
8fc8139
Update fastsurfer.py
pcamach2 Apr 27, 2022
3322cd2
Adds FastSurfer recon workflow
pcamach2 Apr 27, 2022
9d58df9
Add logging of hires if FastSurfer for future use of VINN
pcamach2 Apr 27, 2022
f93e688
Initial draft of including FastSurfer recon wf
pcamach2 Apr 27, 2022
2e89573
Draft FastSurferSource
pcamach2 Apr 28, 2022
e5dab42
Separate surface workflows for FastSurfer and FreeSurfer
pcamach2 Apr 28, 2022
de510df
Include fastsurfer CLI argument
pcamach2 Apr 28, 2022
eddfeae
Format IO specs
pcamach2 Apr 28, 2022
b2e5376
DRAFT: Adds more of output traits
pcamach2 Apr 28, 2022
db2aeec
Debug Convert3D download and install failure in CI
pcamach2 Apr 28, 2022
48c7193
Include DKTatlas outputs, other files
pcamach2 Apr 29, 2022
93e9ee5
Fix conditional for surface workflows
pcamach2 Apr 29, 2022
9e8e22f
Increase mem for FastSurfer recon
pcamach2 Apr 29, 2022
ca039f0
Change URL to debug Convert3D install
pcamach2 Apr 29, 2022
f417766
Fix formatting on FastSCommand docstring
pcamach2 Apr 29, 2022
444d476
Added FastSurfer workflow
pcamach2 Apr 29, 2022
327cef0
Adds FastSurfer detailed outputs to FastSCommand output_spec
pcamach2 Apr 29, 2022
1b67033
Merge pull request #1 from pcamach2/pcamach2-fastsurfer-patch-v2
pcamach2 Apr 29, 2022
2a70ac9
Fix formatting for PEP8
pcamach2 Apr 29, 2022
7e2d53c
Fix formatting for PEP8
pcamach2 Apr 29, 2022
e52fd53
Fix formatting for PEP8
pcamach2 Apr 29, 2022
6545c6d
Fix formatting for PEP8
pcamach2 Apr 29, 2022
8d608b5
Fix formatting for PEP8
pcamach2 Apr 29, 2022
2f2560c
Debug convert3d install
pcamach2 Apr 29, 2022
126b0b5
Fix typo in _get_files
pcamach2 Apr 29, 2022
a5f1690
Add OutputMultiPath import
pcamach2 Apr 29, 2022
3613a05
Add import IOBase
pcamach2 Apr 29, 2022
9bab131
Fix docstring for FastSCommand
pcamach2 Apr 29, 2022
8321407
Remove code-block to debug docstring error
pcamach2 Apr 29, 2022
4753d32
Switch to FastSurfer dev image for Ubuntu 20.04
pcamach2 Apr 30, 2022
ac52464
Change FastSurfer directory to match Dockerfile
pcamach2 Apr 30, 2022
9a89867
Fix formatting for PEP8
pcamach2 Apr 30, 2022
2a56ff1
Include FastSurfer
pcamach2 Apr 30, 2022
c65d4c5
Add FastSurfer
pcamach2 Apr 30, 2022
265eb54
Change default license directory
pcamach2 Apr 30, 2022
6237a00
Switch check_fastsufer to only return boolean
pcamach2 Apr 30, 2022
592a543
Update description of check_fastsurfer
pcamach2 Apr 30, 2022
5737828
Adds FastSurfer reporting
pcamach2 Apr 30, 2022
81742b1
Fix formatting for PEP8
pcamach2 Apr 30, 2022
79e3c05
Fix formatting for PEP8
pcamach2 Apr 30, 2022
954d3a3
Fix formatting for PEP8
pcamach2 Apr 30, 2022
b9d24a8
Fix formatting for PEP8
pcamach2 Apr 30, 2022
58d5be8
Fix formatting for PEP8
pcamach2 Apr 30, 2022
067e505
Fix typo
pcamach2 Apr 30, 2022
9455019
Fix syntax
pcamach2 Apr 30, 2022
a192fd3
Fix variables for FastSurfer reports
pcamach2 Apr 30, 2022
b00bc95
Update fastsurfer.py
pcamach2 Apr 30, 2022
a545a02
Fix syntax
pcamach2 Apr 30, 2022
705ce9e
Fix syntax for PEP8
pcamach2 Apr 30, 2022
ee535a0
Add fastsurfer input to init_anat_derivatives
pcamach2 Apr 30, 2022
f03fd64
Add FastSurfer parameter to init_anat_reports_wf
pcamach2 May 1, 2022
7a76f96
Set FastSurfer parameter default to False
pcamach2 May 1, 2022
aa49b70
Switch fs_license to use FS_LICENSE os env var
pcamach2 May 1, 2022
8eae255
Add fastsurfer argument to init_anat_reports_wf
pcamach2 May 1, 2022
d2c50a4
Add default path for freesurfer license as /opt/freesurfer/license.txt
pcamach2 May 1, 2022
7262453
Fix typo
pcamach2 May 1, 2022
7fbd489
Add omp_nthreads and hires arguments to init_surface_recon_wf
pcamach2 May 1, 2022
cb65d08
Fix conditionals for FastSurfer in init_gifti_surface_wf & init_segs_…
pcamach2 May 1, 2022
bd9c11e
Fix formatting for PEP8
pcamach2 May 1, 2022
994d352
Switch fs_license default to $FREESURFER_HOME/license.txt
pcamach2 May 1, 2022
a4fa911
Fix formatting for PEP8
pcamach2 May 1, 2022
6d43967
Remove os.environ method of setting fs_license
pcamach2 May 2, 2022
b19510f
Update method for testing fs_license paths
pcamach2 May 2, 2022
7444df5
Update anatomical.py
pcamach2 May 2, 2022
c59e917
Fix formatting for PEP8
pcamach2 May 2, 2022
5cbf0ff
Call check_fastsurfer for conditionals
pcamach2 May 2, 2022
d5b11c3
Pass fastsurfer parameter instead of check_fastsurfer
pcamach2 May 2, 2022
32a62f3
Fix formatting for PEP8
pcamach2 May 2, 2022
c2b3fa6
Fix missing parameter for FastSurfer
pcamach2 May 2, 2022
62667d4
remove duplicate nodes
pcamach2 May 3, 2022
f275c4a
Fix opts fastsurfer typo
pcamach2 May 3, 2022
56dff95
Fix conditional to check opts.fastsurfer
pcamach2 May 4, 2022
86d7aa2
Revert from FastSurfer Docker style Freesurfer install
pcamach2 May 4, 2022
6f9701c
Update Dockerfile
pcamach2 May 4, 2022
8d8381f
Default fastsurfer_status set to "Not run"
pcamach2 May 4, 2022
ff60562
Fix docstring for FastSCommand
pcamach2 May 4, 2022
9fe2cda
Update fastsurfer.py
pcamach2 May 4, 2022
6fa46e2
fix docstring for FastSCommand
pcamach2 May 4, 2022
0b5d07e
Update fastsurfer.py
pcamach2 May 4, 2022
d0d753a
Fix imports to resolve Flake8 F821 errors
pcamach2 May 4, 2022
ab65e0d
Fix typo and switch logger to LOGGER
pcamach2 May 4, 2022
049937d
Fix indentation for continuation lines Flake8 E122
pcamach2 May 4, 2022
04b5888
Fix Flake8 error E302 expected 2 blank lines, found 1
pcamach2 May 4, 2022
d6f24c5
Fix variable names in fs-subjects-dir nodes
pcamach2 May 4, 2022
280ca53
Fix conda base env for FastSurfer
pcamach2 May 4, 2022
9c5d271
Switch to newer Freesurfer 7.2.0 for FastSufer forward compatibility
pcamach2 May 6, 2022
d433f3b
Creates Dockerfile for stable FastSurfer version, FreeSurfer 6.0.1 co…
pcamach2 May 6, 2022
7a6a6e8
Remove unnecessary copy instruction
pcamach2 May 6, 2022
960fdee
Revert to python3.6 for FastSurfer 1.0.1
pcamach2 May 6, 2022
f79f21c
Remove redundancies in conda envs
pcamach2 May 6, 2022
dc2c5f7
Update Dockerfile
pcamach2 May 7, 2022
bd40cb6
Fix: remove redundant conda build instructions and venv
pcamach2 May 9, 2022
cd4730f
Merge branch 'master' into pcamach2-fastsurfer-patch
pcamach2 May 24, 2022
0784da5
Fix retrieval of FastSurfer dev branch
pcamach2 May 24, 2022
ebd3318
Fix layer order
pcamach2 May 24, 2022
c6e9741
Fix missing libs
pcamach2 May 25, 2022
532313e
Update arguments for fastsurfer
pcamach2 Jun 23, 2022
219a422
Fix support for fastsurfer workflow
pcamach2 Jun 23, 2022
97accf4
Fix workflow for FastSurfer
pcamach2 Jun 23, 2022
26647bb
Fix PEP8 compliance
pcamach2 Jun 23, 2022
0b20fdd
Fix PEP8 compliance
pcamach2 Jun 23, 2022
5328f39
Fix PEP8 compliance
pcamach2 Jun 23, 2022
83a4a8e
Fix PEP8 compliance
pcamach2 Jun 23, 2022
fc0d34e
Merge pull request #2 from nipreps/master
pcamach2 Jul 5, 2022
c093515
Add FastSurfer
pcamach2 Jul 5, 2022
e290f89
Update for compatibility with FastSurfer
pcamach2 Jul 5, 2022
5e5f56d
Update for FastSurfer compatibility
pcamach2 Jul 5, 2022
15cbfb9
Add compatibility with FastSurfer
pcamach2 Jul 5, 2022
25c2305
Add files via upload
pcamach2 Jul 5, 2022
239b01a
Update run.py
pcamach2 Jul 5, 2022
fcd66b4
PEP8 compliance
pcamach2 Jul 5, 2022
d6c16ce
PEP8 compliance
pcamach2 Jul 5, 2022
84938f4
PEP8 compliance
pcamach2 Jul 5, 2022
051580e
Fix Flake8 compliance
pcamach2 Jul 5, 2022
a95b94f
Remove print command artifact from dev testing
pcamach2 Jul 5, 2022
ab0fe2f
Comment out unused import
pcamach2 Jul 5, 2022
fbcd2e4
Update FastSurfer, Freesurfer versions
pcamach2 Jul 6, 2022
a32ce8b
Delete unused Dockerfile
pcamach2 Jul 6, 2022
dfda235
Add explicit in-tree-build argument to pip, debug conda
pcamach2 Jul 6, 2022
f031a40
Update fastsurfer.py
pcamach2 Jul 8, 2022
d17aa7b
Comment out unused import os package
pcamach2 Jul 8, 2022
9263ebb
Merge branch 'master' into pcamach2-fastsurfer-patch
effigies Jul 27, 2022
8e1f998
Update smriprep/interfaces/fastsurfer.py
pcamach2 Aug 1, 2022
26409f4
Apply suggestions from code review
pcamach2 Aug 1, 2022
21d3eff
Update smriprep/cli/run.py
pcamach2 Aug 1, 2022
db59431
Fix logic in surface recon workflow selection
pcamach2 Aug 1, 2022
0e12ed8
Revert to previous outputnode for existing FreeSurfer compatibility
pcamach2 Aug 1, 2022
b89254d
Update smriprep/workflows/anatomical.py
pcamach2 Aug 1, 2022
25c6399
Deduplicating get_surfaces and fssource
pcamach2 Aug 1, 2022
0ea2473
Remove unnecessary FastSurfer report class
pcamach2 Aug 1, 2022
4431be2
Add FASTSURFER_HOME to PATH
pcamach2 Aug 1, 2022
7575402
Update default python version and remove unused default values for in…
pcamach2 Aug 1, 2022
415163c
Sub-class FastSurerSourceOutputSpec from FSSourceOutputSpec
pcamach2 Aug 3, 2022
ac9aa33
De-duplicating surface_recon_wf
pcamach2 Aug 3, 2022
313576e
PEP8 compliance
pcamach2 Aug 3, 2022
e4d7e4d
PEP8 compliance
pcamach2 Aug 3, 2022
5d015ed
PEP8 compliance
pcamach2 Aug 3, 2022
6643b93
PEP8 compliance
pcamach2 Aug 3, 2022
573f0b3
PEP8 compliance
pcamach2 Aug 3, 2022
9bdb72c
Revert to FSSurfaceReport for FastSurfer
pcamach2 Aug 3, 2022
4247e71
Import FreeSurferSource
pcamach2 Aug 3, 2022
5cacac2
Fix typo
pcamach2 Aug 3, 2022
dde9494
Fix typo
pcamach2 Aug 3, 2022
73cfea8
Attempt to fix docstring error in build_docs
pcamach2 Aug 3, 2022
2cbd94a
Revert from FastSurfer v FreeSurfer specific string vars to nipype co…
pcamach2 Aug 4, 2022
712385d
Merge pull request #3 from nipreps/master
pcamach2 Aug 12, 2022
3a535c9
Update python version
pcamach2 Aug 12, 2022
4a4f7a0
Revert miniconda version for FastSurfer compatibility, update nibabel
pcamach2 Aug 15, 2022
18c4117
Nibabel==4.0.1 install after fastsurfer environment update
pcamach2 Aug 15, 2022
0a1ec70
Switch to python 3.8
pcamach2 Aug 16, 2022
98c3a87
Upgrade to latest FastSurfer release v1.1.1
pcamach2 Aug 18, 2022
9b517ec
Update FastSurfer version
pcamach2 Aug 18, 2022
b18e440
Switch to Nibabel 4.0.2
pcamach2 Sep 1, 2022
de08d59
Install nibabel via conda
pcamach2 Sep 1, 2022
1a041ca
Attempt to resolve CircleCI build error
pcamach2 Sep 1, 2022
0c49007
De-duplicating workflow
pcamach2 Sep 1, 2022
73116bb
Remove unused package imports (Flake8 compliance)
pcamach2 Sep 1, 2022
aedf220
Update FastSurfer version
pcamach2 Sep 22, 2022
1094e04
Update installation.rst
pcamach2 Sep 22, 2022
182f47e
Merge branch 'master' into pcamach2-fastsurfer-patch
pcamach2 Oct 18, 2022
87940c9
Fix error for Flake8
pcamach2 Oct 18, 2022
1c1fc21
Fix typo in FastSurfer version
pcamach2 Oct 18, 2022
1bdf326
Change nibabel version after installing FastSurfer dependencies
pcamach2 Oct 19, 2022
6d8e32d
update authors
pcamach2 Jan 6, 2023
3f6b1f6
Merge branch 'nipreps-master' into pcamach2-fastsurfer-patch
pcamach2 Jan 6, 2023
96edd2a
Test FreeSurfer license path fix
pcamach2 Jan 9, 2023
dbb647b
Update Dockerfile
pcamach2 Jan 9, 2023
e9673a7
Update run.py
pcamach2 Jan 9, 2023
8bcb69c
Update run.py
pcamach2 Jan 10, 2023
92c2bbc
Update to FastSurfer v2.0.0
pcamach2 Jan 12, 2023
45d2b54
Fix typo in FastSurfer git clone
pcamach2 Jan 12, 2023
e026c6d
Update FastSurfer version
pcamach2 Jan 30, 2023
e5fbb1c
Update Dockerfile
pcamach2 Jan 30, 2023
2263258
Remove unnecessary SetUpFreeSurfer.sh from bashrc
pcamach2 Jan 30, 2023
f9b9e79
Merge branch 'master' into pcamach2-fastsurfer-patch
pcamach2 Jan 31, 2023
539fe07
Update FastSurfer version
pcamach2 Jan 31, 2023
5c4e680
Restore FS_LICENSE generation from B64
pcamach2 Feb 15, 2023
8f2f0ca
Remove branch tags
pcamach2 Feb 16, 2023
016dc5c
Merge remote-tracking branch 'origin/master' into pcamach2-fastsurfer…
pcamach2 Feb 21, 2023
721ab2c
Merge remote-tracking branch 'origin/master' into pcamach2-fastsurfer…
pcamach2 Feb 21, 2023
0c3c420
Merge branch 'master' into pcamach2-fastsurfer-patch
pcamach2 Feb 21, 2023
7154e1b
Add checkpoints for FastSurfer from FastSurfer Dockerfile
pcamach2 Feb 21, 2023
d2feae9
Switch order of conda env updates
pcamach2 Feb 21, 2023
d0e8a3f
Update FastSurfer to v2.0.4
pcamach2 Feb 22, 2023
d869a16
Reorder FastSurfer directory copy and remove unused git clone
pcamach2 Feb 23, 2023
018da7f
Merge branch 'master' into pcamach2-fastsurfer-patch
pcamach2 Mar 7, 2023
b6f083a
Debugging FastSurfer Workflow
pcamach2 Mar 21, 2023
5d82055
Debugging FastSurfer Workflow
pcamach2 Mar 21, 2023
9b891fa
Debugging FastSurfer Workflow
pcamach2 Mar 21, 2023
90979a7
Merge pull request #6 from nipreps/master
pcamach2 Mar 21, 2023
dffab67
Merge branch 'nipreps:master' into pcamach2-fastsurfer-patch
pcamach2 May 16, 2023
e810a7c
Include mri_mc for FastSurfer compatibility
pcamach2 May 17, 2023
3cee842
Remove exclusion of files needed for FastSurfer v2.0.4
pcamach2 May 18, 2023
456b03a
Remove repeated package installations
pcamach2 May 18, 2023
b5a1bb7
Debugging workflows for FastSurfer
pcamach2 May 18, 2023
ff91fea
Add files via upload
pcamach2 May 18, 2023
ef1054c
Change inputs and defaults to match FastSurfer v2.0.4 CLI
pcamach2 May 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@
"name": "Ghosh, Satrajit",
"orcid": "0000-0002-5312-6729",
"type": "Researcher"
},
{
"affiliation": "Beckman Institute for Advanced Science & Technology, University of Illinois at Urbana-Champaign, IL, USA",
"name": "Camacho, Paul B.",
"orcid": "0000-0001-9048-7307",
"type": "Researcher"
}
],
"keywords": [
Expand Down
69 changes: 58 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,17 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

# Use Ubuntu 20.04 LTS
FROM ubuntu:focal-20210416
## Start with ubuntu base as in FastSurfer Docker image
## https://github.com/Deep-MI/FastSurfer/blob/0749f38e656ed0da977c408b4383db88e1a8b563/Docker/Dockerfile

FROM ubuntu:focal-20210416
# Prepare environment
ENV DEBIAN_FRONTEND="noninteractive"
ENV LANG=C.UTF-8
ARG PYTHON_VERSION=3.8
ARG CONDA_FILE=Miniconda3-py38_4.11.0-Linux-x86_64.sh
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && \
apt-get install -y --no-install-recommends \
apt-utils \
Expand All @@ -34,6 +41,9 @@ RUN apt-get update && \
bzip2 \
ca-certificates \
curl \
wget \
upx \
file \
git \
libtool \
lsb-release \
Expand All @@ -43,14 +53,44 @@ RUN apt-get update && \
xvfb && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

ENV DEBIAN_FRONTEND="noninteractive" \
LANG="en_US.UTF-8" \
LC_ALL="en_US.UTF-8"
# git clone dev branch of FastSurfer
RUN cd /opt && mkdir /fastsurfer \
&& git clone -b v.1.1.2 https://github.com/Deep-MI/FastSurfer.git \
&& cp /opt/FastSurfer/fastsurfer_env_gpu.yml /fastsurfer/fastsurfer_env_gpu.yml

# Install conda
RUN wget --no-check-certificate -qO ~/miniconda.sh https://repo.continuum.io/miniconda/$CONDA_FILE && \
chmod +x ~/miniconda.sh && \
~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh

# Installing freesurfer
COPY docker/files/freesurfer7.2-exclude.txt /usr/local/etc/freesurfer7.2-exclude.txt
RUN curl -sSL https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/7.2.0/freesurfer-linux-ubuntu18_amd64-7.2.0.tar.gz \
 | tar zxv --no-same-owner -C /opt --exclude-from=/usr/local/etc/freesurfer7.2-exclude.txt
| tar zxv --no-same-owner -C /opt --exclude-from=/usr/local/etc/freesurfer7.2-exclude.txt

# Install required packages for freesurfer to run
RUN apt-get update && apt-get install -y --no-install-recommends \
tcsh \
time \
bc \
gawk \
libgomp1 && \
apt clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Add FreeSurfer Environment variables
ENV OS=Linux \
FS_OVERRIDE=0 \
FIX_VERTEX_AREA= \
SUBJECTS_DIR=/opt/freesurfer/subjects \
FSF_OUTPUT_FORMAT=nii.gz \
FREESURFER_HOME=/opt/freesurfer \
PYTHONUNBUFFERED=0 \
PATH=/opt/freesurfer/bin:$PATH

# Copy fastsurfer from git folder
RUN cp -R /opt/FastSurfer/* /fastsurfer/

# Simulate SetUpFreeSurfer.sh
ENV FSL_DIR="/opt/fsl-6.0.5.1" \
Expand Down Expand Up @@ -90,6 +130,7 @@ RUN apt-get update -qq \
libxrender1 \
libxt6 \
sudo \
curl \
wget \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
Expand Down Expand Up @@ -226,8 +267,8 @@ WORKDIR $ANTSPATH
RUN curl -sSL "https://dl.dropbox.com/s/gwf51ykkk5bifyj/ants-Linux-centos6_x86_64-v2.3.4.tar.gz" \
| tar -xzC $ANTSPATH --strip-components 1

# nipreps/miniconda:py39_0525.0
COPY --from=nipreps/miniconda@sha256:40fffd37963502dcd8549773559fc21182f52460e59e0ad6398a84faf6055641 /opt/conda /opt/conda
# nipreps/miniconda:py38_1.4.1
COPY --from=nipreps/miniconda@sha256:ebbff214e6c9dc50ccc6fdbe679df1ffcbceaa45b47a75d6e34e8a064ef178da /opt/conda /opt/conda

RUN ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
Expand All @@ -253,7 +294,8 @@ ENV HOME="/home/smriprep" \
LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH"

RUN echo ". /opt/conda/etc/profile.d/conda.sh" >> $HOME/.bashrc && \
echo "conda activate base" >> $HOME/.bashrc
echo "conda activate base" >> $HOME/.bashrc && \
echo "$FREESURFER_HOME/SetUpFreeSurfer.sh" >> $HOME/.bashrc

# Precaching atlases
COPY scripts/fetch_templates.py fetch_templates.py
Expand All @@ -268,8 +310,11 @@ COPY . /src/smriprep
ARG VERSION
# Force static versioning within container
RUN echo "${VERSION}" > /src/smriprep/smriprep/VERSION && \
echo "include smriprep/VERSION" >> /src/smriprep/MANIFEST.in && \
/opt/conda/bin/python -m pip install --no-cache-dir "/src/smriprep[all]"
echo "include smriprep/${VERSION}" >> /src/smriprep/MANIFEST.in && \
/opt/conda/bin/python -m pip install --no-cache-dir "/src/smriprep[all]" && \
/opt/conda/bin/python -m pip install --no-cache-dir nibabel==4.0.2

RUN conda env update -n base --file /fastsurfer/fastsurfer_env_gpu.yml
effigies marked this conversation as resolved.
Show resolved Hide resolved

RUN find $HOME -type d -exec chmod go=u {} + && \
find $HOME -type f -exec chmod go=u {} + && \
Expand All @@ -280,6 +325,8 @@ RUN find $HOME -type d -exec chmod go=u {} + && \
ENV FREESURFER="/opt/freesurfer"

ENV IS_DOCKER_8395080871=1
ENV FASTSURFER_HOME=/fastsurfer
ENV PATH="/fastsurfer:/$PATH"

RUN ldconfig
WORKDIR /tmp
Expand Down
Loading