|
53 | 53 | fail_ci_if_error: false
|
54 | 54 | file: ./coverage.xml
|
55 | 55 |
|
| 56 | + cron-pt-image: |
| 57 | + if: github.repository == 'Project-MONAI/MONAI' |
| 58 | + container: |
| 59 | + image: nvcr.io/nvidia/pytorch:20.12-py3 # testing with the latest pytorch base image |
| 60 | + options: "--gpus all" |
| 61 | + runs-on: [self-hosted, linux, x64, common] |
| 62 | + steps: |
| 63 | + - uses: actions/checkout@v2 |
| 64 | + - name: Install the dependencies |
| 65 | + run: | |
| 66 | + which python |
| 67 | + python -m pip install --upgrade pip wheel |
| 68 | + python -m pip install -r requirements-dev.txt |
| 69 | + python -m pip list |
| 70 | + - name: Run tests report coverage |
| 71 | + run: | |
| 72 | + export LAUNCH_DELAY=$[ $RANDOM % 16 * 60 ] |
| 73 | + echo "Sleep $LAUNCH_DELAY" |
| 74 | + sleep $LAUNCH_DELAY |
| 75 | + nvidia-smi |
| 76 | + export CUDA_VISIBLE_DEVICES=$(python -m tests.utils) |
| 77 | + echo $CUDA_VISIBLE_DEVICES |
| 78 | + python -c "import torch; print(torch.__version__); print('{} of GPUs available'.format(torch.cuda.device_count()))" |
| 79 | + python -c 'import torch; print(torch.rand(5,3, device=torch.device("cuda:0")))' |
| 80 | + BUILD_MONAI=1 ./runtests.sh --coverage |
| 81 | + coverage xml |
| 82 | + - name: Upload coverage |
| 83 | + uses: codecov/codecov-action@v1 |
| 84 | + with: |
| 85 | + fail_ci_if_error: false |
| 86 | + file: ./coverage.xml |
| 87 | + |
56 | 88 | cron-docker:
|
57 | 89 | if: github.repository == 'Project-MONAI/MONAI'
|
58 | 90 | container:
|
|
61 | 93 | runs-on: [self-hosted, linux, x64, common]
|
62 | 94 | steps:
|
63 | 95 | - name: Run tests report coverage
|
64 |
| - # The docker image process has done the compilation. BUILD_MONAI=1 may not be necessary. |
| 96 | + # The docker image process has done the compilation. |
| 97 | + # BUILD_MONAI=1 is necessary for triggering the USE_COMPILED flag. |
65 | 98 | run: |
|
66 | 99 | cd /opt/monai
|
67 | 100 | nvidia-smi
|
|
0 commit comments