Skip to content

Commit

Permalink
update quicktest.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
taha-abdullah committed Jun 5, 2024
1 parent dcbb55c commit 2b0dcdd
Showing 1 changed file with 30 additions and 47 deletions.
77 changes: 30 additions & 47 deletions .github/workflows/quicktest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,54 +55,38 @@ jobs:
cd $PYTHONPATH
fi
# Run FastSurfer on MRI data
run-fastsurfer:
runs-on: self-hosted
needs: build-singularity-image
steps:
- name: Run FastSurfer
run: |
cd $RUNNER_FS_OUTPUT
DIRECTORY="subjectX"
echo "pwd: $(pwd)"
if [ ! -d "$DIRECTORY" ]; then
# if the directory does not exist, run FastSurfer
echo "Output directory does not exist. Running FastSurfer."
singularity exec --nv \
--no-home \
--bind $GITHUB_WORKSPACE:/fastsurfer-dev \
--env FASTSURFER_HOME=/fastsurfer-dev \
-B $RUNNER_FS_MRI_DATA:/data \
-B $RUNNER_FS_OUTPUT:/output \
-B $RUNNER_FS_LICENSE:/fs_license \
$RUNNER_SINGULARITY_IMGS/fastsurfer-gpu.sif \
/fastsurfer/run_fastsurfer.sh \
--fs_license /fs_license/.license \
--t1 /data/subjectx/orig.mgz \
--sid subjectX --sd /output \
--parallel --3T
else
echo "Output directory already exists. Deleting directory and running FastSurfer."
rm -rf $DIRECTORY
singularity exec --nv \
--no-home \
--bind $GITHUB_WORKSPACE:/fastsurfer-dev \
--env FASTSURFER_HOME=/fastsurfer-dev \
-B $RUNNER_FS_MRI_DATA:/data \
-B $RUNNER_FS_OUTPUT:/output \
-B $RUNNER_FS_LICENSE:/fs_license \
$RUNNER_SINGULARITY_IMGS/fastsurfer-gpu.sif \
/fastsurfer/run_fastsurfer.sh \
--fs_license /fs_license/.license \
--t1 /data/subjectx/orig.mgz \
--sid subjectX --sd /output \
--parallel --3T
fi
# # Run FastSurfer on MRI data
# run-fastsurfer:
# runs-on: self-hosted
# needs: build-singularity-image
# steps:
# - name: Run FastSurfer
# run: |
# cd $RUNNER_FS_OUTPUT
# DIRECTORY="subjectX"
# echo "pwd: $(pwd)"
# if [ -d "$DIRECTORY" ]; then
# # if output already exists, delete it and run again
# echo "Output already exists. Deleting output directory and running FastSurfer again."
# rm -rf $DIRECTORY
# singularity exec --nv \
# --no-home \
# --bind $GITHUB_WORKSPACE:/fastsurfer-dev \
# --env FASTSURFER_HOME=/fastsurfer-dev \
# -B $RUNNER_FS_MRI_DATA:/data \
# -B $RUNNER_FS_OUTPUT:/output \
# -B $RUNNER_FS_LICENSE:/fs_license \
# $RUNNER_SINGULARITY_IMGS/fastsurfer-gpu.sif \
# /fastsurfer/run_fastsurfer.sh \
# --fs_license /fs_license/.license \
# --t1 /data/subjectx/orig.mgz \
# --sid subjectX --sd /output \
# --parallel --3T

# Test file existence
test-file-existence:
runs-on: self-hosted
needs: run-fastsurfer
# needs: run-fastsurfer
steps:
- name: Test File Existence
run: |
Expand All @@ -111,7 +95,7 @@ jobs:
# Test for errors in log files
test-error-messages:
runs-on: self-hosted
needs: [run-fastsurfer, test-file-existence]
# needs: [test-file-existence]
steps:
- name: Test Log Files For Error Messages
run: |
Expand All @@ -120,9 +104,8 @@ jobs:
# Test seg_stats
test-seg-stats:
runs-on: self-hosted
needs: [run-fastsurfer, test-file-existence, test-error-messages]
# needs: [test-error-messages]
steps:
- name: Test seg_stats
run: |
pip install pandas
python3 test/quick_test/test_stats.py $RUNNER_FS_REF_STATS $RUNNER_FS_OUTPUT_STATS

0 comments on commit 2b0dcdd

Please sign in to comment.