File tree Expand file tree Collapse file tree 3 files changed +34
-4
lines changed Expand file tree Collapse file tree 3 files changed +34
-4
lines changed Original file line number Diff line number Diff line change 41
41
with :
42
42
python-version : ${{ matrix.python-version }}
43
43
44
+ - name : Check for nvcc and set CUDA flag
45
+ id : detect-cuda
46
+ run : |
47
+ if command -v nvcc &> /dev/null; then
48
+ echo "nvcc found: CUDA is available"
49
+ echo "HAS_CUDA=true" >> $GITHUB_ENV
50
+ else
51
+ echo "nvcc not found: CUDA is not available"
52
+ echo "HAS_CUDA=false" >> $GITHUB_ENV
53
+ fi
54
+
55
+ - name : Install AFNI
56
+ run : |
57
+ # Detect Ubuntu version
58
+ UBUNTU_VERSION=$(lsb_release -rs | cut -d. -f1)
59
+ AFNI_PACKAGE="linux_ubuntu_${UBUNTU_VERSION}_64"
60
+ echo "Detected Ubuntu version: $UBUNTU_VERSION"
61
+ echo "Using AFNI package: $AFNI_PACKAGE"
62
+ # Install dependencies
63
+ sudo apt-get update
64
+ sudo apt-get install -y tcsh curl libglu1-mesa libxmu6 libxm4 libgsl-dev libglw1-mesa
65
+ # Download and install AFNI
66
+ curl -O https://afni.nimh.nih.gov/pub/dist/bin/${AFNI_PACKAGE}/@update.afni.binaries
67
+ tcsh @update.afni.binaries -package $AFNI_PACKAGE -do_extras
68
+ # Add AFNI to PATH
69
+ echo "$HOME/abin" >> $GITHUB_PATH
70
+
44
71
- name : Install TeX Live
45
72
run : |
46
73
sudo apt-get update
69
96
pip install osfclient
70
97
osf -p 39k4x fetch hcpdata.npz "${TEST_DATA_HOME}/hcpdata.npz"
71
98
99
+ - name : Download SynthStrip model
100
+ run : |
101
+ wget https://ftp.nmr.mgh.harvard.edu/pub/dist/freesurfer/synthstrip/models/synthstrip.1.pt -P "${TEST_DATA_HOME}"
102
+
72
103
- name : Install tox
73
104
run : |
74
105
python -m pip install --upgrade pip
Original file line number Diff line number Diff line change 74
74
" bmask_path = (\n " ,
75
75
" OUTPUT_DIR / bold_run.parent / f\" {bold_run.name.rsplit('_', 1)[0]}_label-brain_mask.nii.gz\"\n " ,
76
76
" )\n " ,
77
+ " use_gpu = getenv(\" HAS_CUDA\" , \" false\" ).lower() == \" true\"\n " ,
77
78
" if not bmask_path.exists():\n " ,
78
79
" bmsk_results = SynthStrip(\n " ,
79
80
" in_file=str(avg_path),\n " ,
80
- " use_gpu=True,\n " ,
81
+ " model=DATA_PATH / \" synthstrip.1.pt\" ,\n " ,
82
+ " use_gpu=use_gpu,\n " ,
81
83
" ).run(cwd=str(WORKDIR))\n " ,
82
84
" copy(bmsk_results.outputs.out_mask, bmask_path)\n " ,
83
85
" \n " ,
Original file line number Diff line number Diff line change 27
27
28
28
# Find and run the notebooks
29
29
notebooks = glob .glob ("docs/notebooks/*.ipynb" )
30
- # Make bold_realignment.ipynb Jupyter notebook an exception as it involves running a realignment
31
- # process for several DataLad datasets, which requires long running times.
32
- notebooks .remove ("docs/notebooks/bold_realignment.ipynb" )
33
30
34
31
sys .exit (subprocess .call (["pytest" , "--nbmake" ] + notebooks ))
You can’t perform that action at this time.
0 commit comments