Feature more image transforms #15
Workflow file for this run
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
name: Scan Configs | |
on: [pull_request,workflow_dispatch] | |
env: | |
singularity_image: oras://ghcr.io/berenslab/retinal-rl:singularity-image-latest | |
sif_file: retinal-rl_singularity-image-latest.sif | |
jobs: | |
scan: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Apptainer | |
uses: eWaterCycle/setup-apptainer@v2 | |
with: | |
apptainer-version: 1.3.0 | |
- name: Cache Singularity Image | |
id: cache-singularity | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.sif_file }} | |
key: ${{ runner.os }}-singularity-${{ hashFiles('~/resources/retinal-rl.def') }} | |
restore-keys: | | |
${{ runner.os }}-singularity-${{ hashFiles('~/resources/retinal-rl.def') }} | |
${{ runner.os }}-singularity- | |
- name: Pull Singularity container | |
if: steps.cache-singularity.outputs.cache-hit != 'true' | |
run: | | |
singularity registry login --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} oras://ghcr.io | |
singularity pull ${{ env.sif_file }} ${{ env.singularity_image }} | |
- name: Prepare experiment files | |
run: | | |
cp -r resources/config_templates/* config/ | |
mkdir -p experiment_list | |
for file in resources/config_templates/experiments/*.yaml; do | |
filename=$(basename "$file" .yaml) | |
echo "$filename" >> experiment_list/experiments.txt | |
done | |
- name: Scan classification configs | |
run: | | |
while IFS= read -r experiment; do | |
singularity exec ${{ env.sif_file }} \ | |
python main.py +experiment="$experiment" command=scan system.device=cpu | |
done < experiment_list/experiments.txt |