|
1 | 1 | name: crons
|
2 | 2 |
|
3 | 3 | on:
|
| 4 | + push: |
| 5 | + branches: |
| 6 | + - testing-2108 |
4 | 7 | # schedule:
|
5 | 8 | # - cron: "0 2 * * *" # at 02:00 UTC
|
6 | 9 | # Allows you to run this workflow manually from the Actions tab
|
7 | 10 | workflow_dispatch:
|
8 | 11 |
|
9 | 12 | jobs:
|
10 |
| - cron-gpu: |
11 |
| - if: github.repository == 'Project-MONAI/MONAI' |
12 |
| - container: |
13 |
| - image: nvcr.io/nvidia/pytorch:20.03-py3 # CUDA 10.2 |
14 |
| - options: "--gpus all" |
15 |
| - runs-on: [self-hosted, linux, x64, common] |
16 |
| - strategy: |
17 |
| - matrix: |
18 |
| - pytorch-version: [1.5.1, 1.6.0, 1.7.1, 1.8.1, latest] |
19 |
| - steps: |
20 |
| - - uses: actions/checkout@v2 |
21 |
| - - name: Install the dependencies |
22 |
| - run: | |
23 |
| - which python |
24 |
| - python -m pip install --upgrade pip wheel |
25 |
| - python -m pip uninstall -y torch torchvision |
26 |
| - if [ ${{ matrix.pytorch-version }} == "latest" ]; then |
27 |
| - python -m pip install torch torchvision |
28 |
| - elif [ ${{ matrix.pytorch-version }} == "1.5.1" ]; then |
29 |
| - python -m pip install torch==1.5.1 torchvision==0.6.1 |
30 |
| - elif [ ${{ matrix.pytorch-version }} == "1.6.0" ]; then |
31 |
| - python -m pip install torch==1.6.0 torchvision==0.7.0 |
32 |
| - elif [ ${{ matrix.pytorch-version }} == "1.7.1" ]; then |
33 |
| - python -m pip install torch==1.7.1 torchvision==0.8.2 |
34 |
| - elif [ ${{ matrix.pytorch-version }} == "1.8.1" ]; then |
35 |
| - python -m pip install torch==1.8.1 torchvision==0.9.1 |
36 |
| - fi |
37 |
| - python -m pip install -r requirements-dev.txt |
38 |
| - python -m pip list |
39 |
| - - name: Run tests report coverage |
40 |
| - run: | |
41 |
| - export LAUNCH_DELAY=$[ $RANDOM % 16 * 60 ] |
42 |
| - echo "Sleep $LAUNCH_DELAY" |
43 |
| - sleep $LAUNCH_DELAY |
44 |
| - nvidia-smi |
45 |
| - export CUDA_VISIBLE_DEVICES=$(python -m tests.utils) |
46 |
| - echo $CUDA_VISIBLE_DEVICES |
47 |
| - trap 'if pgrep python; then pkill python; fi;' ERR |
48 |
| - python -c $'import torch\na,b=torch.zeros(1,device="cuda:0"),torch.zeros(1,device="cuda:1");\nwhile True:print(a,b)' > /dev/null & |
49 |
| - python -c "import torch; print(torch.__version__); print('{} of GPUs available'.format(torch.cuda.device_count()))" |
50 |
| - python -c 'import torch; print(torch.rand(5, 3, device=torch.device("cuda:0")))' |
51 |
| - BUILD_MONAI=1 ./runtests.sh --coverage --unittests # unit tests with coverage report |
52 |
| - BUILD_MONAI=1 ./runtests.sh --coverage --net # integration tests with coverage report |
53 |
| - coverage xml |
54 |
| - if pgrep python; then pkill python; fi |
55 |
| - - name: Upload coverage |
56 |
| - uses: codecov/codecov-action@v1 |
57 |
| - with: |
58 |
| - fail_ci_if_error: false |
59 |
| - file: ./coverage.xml |
60 |
| - |
61 | 13 | cron-pt-image:
|
62 | 14 | if: github.repository == 'Project-MONAI/MONAI'
|
63 | 15 | strategy:
|
64 | 16 | matrix:
|
65 |
| - container: ["pytorch:21.02", "pytorch:21.08"] # 21.02 for backward comp. |
| 17 | + container: ["pytorch:21.08"] # 21.02 for backward comp. |
66 | 18 | container:
|
67 | 19 | image: nvcr.io/nvidia/${{ matrix.container }}-py3 # testing with the latest pytorch base image
|
68 | 20 | options: "--gpus all"
|
|
106 | 58 | if: github.repository == 'Project-MONAI/MONAI'
|
107 | 59 | strategy:
|
108 | 60 | matrix:
|
109 |
| - container: ["pytorch:21.02", "pytorch:21.08"] # 21.02 for backward comp. |
| 61 | + container: ["pytorch:21.08"] # 21.02 for backward comp. |
110 | 62 | container:
|
111 | 63 | image: nvcr.io/nvidia/${{ matrix.container }}-py3 # testing with the latest pytorch base image
|
112 | 64 | options: "--gpus all"
|
@@ -170,36 +122,6 @@ jobs:
|
170 | 122 | PYTHONPATH="$tmp_dir":$PYTHONPATH BUILD_MONAI=1 python ./tests/runner.py -p 'test_((?!integration).)' # unit tests
|
171 | 123 | if pgrep python; then pkill python; fi
|
172 | 124 |
|
173 |
| - cron-docker: |
174 |
| - if: github.repository == 'Project-MONAI/MONAI' |
175 |
| - container: |
176 |
| - image: localhost:5000/local_monai:dockerhub # use currently latest, locally available dockerhub image |
177 |
| - options: "--gpus all" |
178 |
| - runs-on: [self-hosted, linux, x64, common] |
179 |
| - steps: |
180 |
| - - name: Run tests report coverage |
181 |
| - # The docker image process has done the compilation. |
182 |
| - # BUILD_MONAI=1 is necessary for triggering the USE_COMPILED flag. |
183 |
| - run: | |
184 |
| - cd /opt/monai |
185 |
| - nvidia-smi |
186 |
| - export CUDA_VISIBLE_DEVICES=$(python -m tests.utils) |
187 |
| - echo $CUDA_VISIBLE_DEVICES |
188 |
| - trap 'if pgrep python; then pkill python; fi;' ERR |
189 |
| - python -c $'import torch\na,b=torch.zeros(1,device="cuda:0"),torch.zeros(1,device="cuda:1");\nwhile True:print(a,b)' > /dev/null & |
190 |
| - python -c "import torch; print(torch.__version__); print('{} of GPUs available'.format(torch.cuda.device_count()))" |
191 |
| - python -c 'import torch; print(torch.rand(5,3, device=torch.device("cuda:0")))' |
192 |
| - ngc --version |
193 |
| - BUILD_MONAI=1 ./runtests.sh --coverage --pytype --unittests # unit tests with pytype checks, coverage report |
194 |
| - BUILD_MONAI=1 ./runtests.sh --coverage --net # integration tests with coverage report |
195 |
| - coverage xml |
196 |
| - if pgrep python; then pkill python; fi |
197 |
| - - name: Upload coverage |
198 |
| - uses: codecov/codecov-action@v1 |
199 |
| - with: |
200 |
| - fail_ci_if_error: false |
201 |
| - file: ./coverage.xml |
202 |
| - |
203 | 125 | cron-tutorial-notebooks:
|
204 | 126 | if: github.repository == 'Project-MONAI/MONAI'
|
205 | 127 | needs: cron-gpu # so that monai itself is verified first
|
|
0 commit comments