Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add self hosted runner #579

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Add self hosted runner #579

wants to merge 12 commits into from

Conversation

fzimmermann89
Copy link
Member

No description provided.

Copy link
Contributor

github-actions bot commented Dec 12, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/mrpro/algorithms/csm
   inati.py24196%44
   walsh.py16194%34
src/mrpro/algorithms/dcf
   dcf_voronoi.py53492%15, 48–49, 76
src/mrpro/algorithms/optimizers
   adam.py20195%69
src/mrpro/algorithms/reconstruction
   DirectReconstruction.py281643%51–71, 85
   IterativeSENSEReconstruction.py13192%76
   Reconstruction.py502256%42, 54–56, 80–87, 104–113
   RegularizedIterativeSENSEReconstruction.py411759%96–100, 114–139
src/mrpro/data
   AcqInfo.py128398%26, 169, 207
   CsmData.py29390%15, 82–84
   DcfData.py45882%18, 66, 78–83
   IData.py67987%119, 125, 129, 159–167
   IHeader.py75791%75, 109, 127–131
   KHeader.py1531789%25, 119–123, 150, 199, 210, 217–218, 221, 228, 260–271
   KNoise.py311552%39–52, 56–61
   KTrajectory.py69593%178–182
   MoveDataMixin.py1401887%15, 113, 129, 143–145, 207, 323–325, 338, 417, 437–438, 440, 455–456, 458
   QData.py39782%42, 65–73
   Rotation.py6743595%100, 198, 335, 433, 477, 495, 581, 583, 592, 626, 628, 691, 768, 773, 776, 791, 808, 813, 889, 1077, 1082, 1085, 1109, 1113, 1240, 1242, 1250–1251, 1315, 1397, 1690, 1846, 1881, 1885, 1996
   SpatialDimension.py2322191%34, 104, 141, 148, 154, 274–276, 289–291, 325, 343, 356, 369, 382, 395, 404–405, 420, 429
   acq_filters.py12192%47
src/mrpro/data/_kdata
   KData.py1341887%109–110, 125, 132, 142, 150, 204–205, 243, 248–249, 268–279
   KDataRemoveOsMixin.py29293%44, 46
   KDataSelectMixin.py19289%48, 63
   KDataSplitMixin.py48394%53, 84, 93
src/mrpro/data/traj_calculators
   KTrajectoryCalculator.py25292%23, 45
   KTrajectoryIsmrmrd.py13285%41, 50
   KTrajectoryPulseq.py31197%54
src/mrpro/operators
   CartesianSamplingOp.py89397%118, 157, 280
   ConstraintsOp.py60297%46, 48
   EndomorphOperator.py65297%228, 234
   FiniteDifferenceOp.py27293%40, 105
   FourierOp.py158398%263, 381, 386
   Functional.py71593%20–22, 117, 119
   GridSamplingOp.py136993%72–73, 82–83, 90–91, 94, 96, 98
   LinearOperator.py1681094%55, 91, 190, 220, 261, 270, 278, 287, 295, 320
   LinearOperatorMatrix.py1581690%82, 119, 152, 161, 166, 175–178, 191–194, 203, 215, 304, 331, 359
   MultiIdentityOp.py13285%43, 48
   Operator.py78297%25, 74
   ProximableFunctionalSeparableSum.py39392%50, 103, 110
   SliceProjectionOp.py173895%44, 61, 63, 69, 206, 227, 260, 300
   WaveletOp.py120596%152, 170, 205, 210, 233
   ZeroPadOp.py16194%30
src/mrpro/utils
   filters.py62297%44, 49
   reshape.py60198%191
   slice_profiles.py46687%20, 36, 113–116, 149
   sliding_window.py34197%34
   split_idx.py10280%43, 47
   summarize_tensorvalues.py11918%20–29
   typing.py181139%8–23
   zero_pad_or_crop.py31681%26, 30, 54, 57, 60, 63
TOTAL491235393% 

Tests Skipped Failures Errors Time
2262 0 💤 0 ❌ 0 🔥 2m 21s ⏱️

Copy link
Contributor

github-actions bot commented Dec 12, 2024

📚 Documentation

📁 Download as zip
🔍 View online

@fzimmermann89
Copy link
Member Author

That works if i run
docker run -it -e REPO_NAME=PTB-MR -e TOKEN=ABH.... image
with the image build from the Runner dockerfile on my laptop.

@fzimmermann89
Copy link
Member Author

a worker token can be obtained via
curl -X POST -H "Authorization: Bearer $PAT" https://api.github.com/orgs/PTB-MR/actions/runners/registration-token | jq -r '.token' (PAT is a personal access token)

@fzimmermann89
Copy link
Member Author

@schuenke @ckolbPTB
This seems to work with our proxy. The worker is currently running on e....30.
As long as we don't need artifacts etc that would require access to domains blocked by our firewall.

I am currently for testing using the latest mrpro image as base, so no cuda driver.

Also, we should decide when we run this. either only triggered via a comment by a maintainer or only after the merge to main.
And only approved workflows should be allowed to run on the self-hosted worker (setting in the organisation/settings/actions/worker pane)
It should not be possible to make our worker run code via forking without us approving it. We don't want to provide a crypto miner ;)

@fzimmermann89
Copy link
Member Author

@lrlunin said he is interested in continuing here. He will start working using his laptop.

@ckolbPTB after your vacation, lets have a short chat about what system we can use for developing this.

Copy link
Contributor

github-actions bot commented Mar 4, 2025

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/mrpro
   _version.py6267%7–8
src/mrpro/algorithms/csm
   inati.py24196%44
   walsh.py16194%53
src/mrpro/algorithms/dcf
   dcf_voronoi.py55493%15, 55–56, 89
src/mrpro/algorithms/optimizers
   adam.py20195%101
   pdhg.py79396%177–178, 184
   pgd.py51492%106, 151–154
src/mrpro/algorithms/reconstruction
   DirectReconstruction.py281643%59–79, 93
   IterativeSENSEReconstruction.py13192%79
   Reconstruction.py502256%42, 54–56, 80–87, 108–117
   RegularizedIterativeSENSEReconstruction.py411759%97–101, 115–140
src/mrpro/data
   AcqInfo.py128398%26, 169, 207
   CsmData.py29390%15, 84–86
   DcfData.py45882%18, 66, 78–83
   IData.py60887%129, 142, 171–179
   IHeader.py961189%103, 106, 116, 119, 122, 125, 162–166
   KData.py2142588%111–112, 127, 134, 144, 152, 206–207, 245, 250–251, 270–281, 440, 442, 507, 522, 559, 590, 599
   KHeader.py1531789%25, 119–123, 150, 199, 210, 217–218, 221, 228, 260–271
   KNoise.py311552%39–52, 56–61
   KTrajectory.py811285%112–117, 120–122, 207–211
   MoveDataMixin.py1401887%28, 126, 142, 156–158, 220, 336–338, 351, 430, 450–451, 453, 468–469, 471
   QData.py39782%42, 65–73
   Rotation.py7193595%101, 199, 336, 434, 478, 496, 583, 585, 594, 628, 630, 693, 770, 775, 778, 793, 810, 815, 891, 1079, 1084, 1087, 1111, 1115, 1243, 1245, 1253–1254, 1318, 1400, 1703, 1855, 1890, 1894, 2084
   SpatialDimension.py2322191%34, 104, 141, 148, 154, 274–276, 289–291, 325, 343, 356, 369, 382, 395, 404–405, 420, 429
   acq_filters.py12192%47
src/mrpro/data/traj_calculators
   KTrajectoryCalculator.py25292%23, 45
   KTrajectoryIsmrmrd.py13285%41, 50
   KTrajectoryPulseq.py23196%55
src/mrpro/operators
   CartesianSamplingOp.py89397%118, 157, 280
   ConstraintsOp.py60297%46, 48
   EndomorphOperator.py32294%52, 58
   FiniteDifferenceOp.py27293%40, 105
   FourierOp.py73297%234, 239
   Functional.py77988%20–22, 117, 119, 226–228, 242
   GridSamplingOp.py136993%72–73, 82–83, 90–91, 94, 96, 98
   LinearOperator.py2001095%48, 107, 217, 244, 251, 292, 301, 309, 326, 361
   LinearOperatorMatrix.py1621988%82, 119, 152, 161, 166, 175–178, 191–194, 202–203, 208–209, 221, 310, 337, 364
   MultiIdentityOp.py13285%43, 48
   NonUniformFastFourierOp.py1771094%69, 96, 206, 208, 241, 243, 302, 356, 406, 411
   Operator.py79297%32, 88
   ProximableFunctionalSeparableSum.py39392%50, 103, 110
   SliceProjectionOp.py174895%45, 62, 64, 70, 206, 227, 260, 300
   WaveletOp.py119596%151, 169, 204, 209, 232
   ZeroPadOp.py16194%30
src/mrpro/phantoms
   brainweb.py2752691%325–335, 371, 427–430, 452–453, 458–459, 474, 520, 586–587, 606–609, 620, 622, 657–658, 671
src/mrpro/utils
   filters.py62297%44, 49
   reshape.py95298%110, 301
   slice_profiles.py47687%21, 37, 116–119, 152
   sliding_window.py34197%34
   split_idx.py10280%43, 47
   summarize_tensorvalues.py11918%20–29
   typing.py584522%9–217
   zero_pad_or_crop.py31681%26, 30, 55, 58, 61, 64
TOTAL555344992% 

Tests Skipped Failures Errors Time
2461 0 💤 0 ❌ 0 🔥 1m 54s ⏱️

@fzimmermann89
Copy link
Member Author

https://github.com/ci-for-research/self-hosted-runners/blob/master/ubuntu-singularity/entrypoint.sh

Should work in singularity. Note the username environment variable.

@fzimmermann89
Copy link
Member Author

please add a start-runner.sh script that uses the correct image, singularity call, etc, obtains the registration token etc.

otherwise we will forget how to actually start the runner on our cluster.

@lrlunin lrlunin marked this pull request as ready for review March 5, 2025 15:11
@lrlunin
Copy link
Collaborator

lrlunin commented Mar 5, 2025

We would need to further decide when we would like to trigger the pytest-selfhosted...

@fzimmermann89
Copy link
Member Author

This is currently blocked due to office politics.

Before enabling this, we might need some risk assesment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants