Skip to content

FastSurfer Docker Image Build #25

FastSurfer Docker Image Build

FastSurfer Docker Image Build #25

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: FastSurfer Docker Image Build
on:
# push:
# branches: [ "dev" ]
# pull_request:
# branches: [ "dev" ]
# Manual
workflow_dispatch:
jobs:
build-gpu-image:
runs-on: dirac
steps:
# Checkout repo
- uses: actions/checkout@v4
# Set up Python 3.10
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Build GPU FastSurfer Image
run: |
PYTHONPATH=$PYTHONPATH
python3 Docker/build.py --device cuda --tag my_fastsurfer:cuda
run-fastsurfer:
runs-on: dirac
needs: build-gpu-image
steps:
- name: Run FastSurfer
run: |
docker run --gpus all -v $RUNNER_FS_MRI_DATA:/data \
-v $RUNNER_FS_OUTPUT:/output \
-v $RUNNER_FS_LICENSE:/fs_license \
--rm --user $(id -u):$(id -g) my_fastsurfer:cuda \
--fs_license /fs_license/.license \
--t1 /data/subjectx/orig.mgz \
--sid subjectx --sd /output \
--parallel
test-file-existence:
runs-on: dirac
if: ${{ always() }}
needs: run-fastsurfer
steps:
- name: Test File Existence
run: |
python3 -m unittest test_file_existence.py