added Siemens_mMR_ACR2 #120
Workflow file for this run
This file contains hidden or 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
| name: run | |
| on: | |
| push: | |
| branches: ['**'] | |
| tags: ['**'] | |
| paths-ignore: ['.gitignore', 'LICENSE*', 'LICENCE*', 'README.md', 'SIRF_data_preparation/*'] | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| env: | |
| dataset: NeuroLF_Esser_Dataset | |
| image: ghcr.io/synerbi/sirf:petric2-base | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: jlumbroso/free-disk-space@v1.3.1 | |
| with: {docker-images: false, tool-cache: true} | |
| - name: Download test data | |
| run: | | |
| curl -fsSLO https://petric.tomography.stfc.ac.uk/data-raw/2/${dataset}.zip | |
| mkdir -p data; cd data; unzip -u ../${dataset}.zip | |
| - run: docker pull ${image} | |
| - name: test | |
| run: | | |
| docker run --rm --user $(id -u):$(id -g) --group-add users -i -v .:/w -w /w ${image} bash <<EOD | |
| source /opt/SIRF-SuperBuild/INSTALL/bin/env_sirf.sh | |
| # Install dependencies | |
| pip install git+https://github.com/TomographicImaging/Hackathon-000-Stochastic-QualityMetrics | |
| if test -f apt.txt; then | |
| sudo apt-get update | |
| xargs -a apt.txt sudo apt-get install -y | |
| fi | |
| if test -f environment.yml; then | |
| sed -i '/^name:.*/d' environment.yml | |
| conda env update -n base | |
| fi | |
| if test -f requirements.txt; then | |
| pip install -r requirements.txt | |
| fi | |
| conda list | |
| # overwrite any potential user changes | |
| curl -fsSLO https://raw.githubusercontent.com/SyneRBI/PETRIC2/main/petric.py | |
| # ensure main.py exists | |
| test -f main.py || ln -s main_ISTA.py main.py | |
| # Test imports | |
| python <<EOF | |
| from main import Submission, submission_callbacks | |
| from cil.optimisation.algorithms import Algorithm | |
| assert issubclass(Submission, Algorithm) | |
| assert isinstance(submission_callbacks, list) | |
| assert all(callable(callback) for callback in submission_callbacks) | |
| EOF | |
| EOD | |
| full: | |
| if: startsWith(github.ref, 'refs/tags') | |
| runs-on: [self-hosted, docker, cuda] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: {fetch-depth: 0, submodules: recursive} | |
| - run: petric |