FastSurfer Docker Image Build #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |