Skip to content

Commit b94dcc4

Browse files
committed
Merge branch 'dev' of https://github.com/Project-MONAI/MONAI into test_premerge
2 parents f398ad3 + 89684d6 commit b94dcc4

File tree

393 files changed

+11430
-2322
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

393 files changed

+11430
-2322
lines changed

.github/dco.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
allowRemediationCommits:
2+
individual: true

.github/workflows/blossom-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
#- name: Setup java
6060
# uses: actions/setup-java@v1
6161
# with:
62-
# java-version: 1.8
62+
# java-version: '1.8'
6363

6464
# add blackduck properties https://synopsys.atlassian.net/wiki/spaces/INTDOCS/pages/631308372/Methods+for+Configuring+Analysis#Using-a-configuration-file
6565
#- name: Setup blackduck properties

.github/workflows/chatops.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# triggering the workflows by commenting `/black` and `/integration-test`
12
name: chatops
23

34
# currently dispatches /black command to project-monai/monai-code-formatter

.github/workflows/conda.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
name: conda
1+
# daily tests for different OS with conda
2+
name: cron-conda
23

34
on:
45
schedule:
@@ -18,7 +19,7 @@ jobs:
1819
fail-fast: false
1920
matrix:
2021
os: [windows-latest, macOS-latest, ubuntu-latest]
21-
python-version: ["3.7"]
22+
python-version: ["3.8"]
2223
runs-on: ${{ matrix.os }}
2324
env:
2425
QUICKTEST: True

.github/workflows/cron-mmar.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# daily tests for clara mmar models
12
name: cron-mmar
23

34
on:
@@ -18,12 +19,12 @@ jobs:
1819
steps:
1920
- uses: actions/checkout@v3
2021
- name: Set up Python 3.8
21-
uses: actions/setup-python@v3
22+
uses: actions/setup-python@v4
2223
with:
23-
python-version: 3.8
24+
python-version: '3.8'
2425
- name: cache weekly timestamp
2526
id: pip-cache
26-
run: echo "::set-output name=datew::$(date '+%Y-%V')"
27+
run: echo "datew=$(date '+%Y-%V')" >> $GITHUB_OUTPUT
2728
- name: cache for pip
2829
uses: actions/cache@v3
2930
id: cache

.github/workflows/cron.yml

Lines changed: 91 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
name: crons
1+
# nightly: Jenkinsfile.monai-pytorch-versions, monai-latest-image, monai-pip, monai-latest-docker, monai-notebooks
2+
name: nightly-crons
23

34
on:
45
# schedule:
@@ -9,31 +10,86 @@ on:
910
jobs:
1011
cron-gpu:
1112
if: github.repository == 'Project-MONAI/MONAI'
13+
strategy:
14+
matrix:
15+
environment:
16+
- "PT182+CUDA102"
17+
- "PT191+CUDA113"
18+
- "PT110+CUDA113"
19+
- "PT112+CUDA113"
20+
- "PTLATEST+CUDA117"
21+
include:
22+
# https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes
23+
- environment: PT182+CUDA102
24+
pytorch: "torch==1.8.2 torchvision==0.9.2 --extra-index-url https://download.pytorch.org/whl/lts/1.8/cu102"
25+
base: "nvcr.io/nvidia/cuda:10.2-devel-ubuntu18.04"
26+
- environment: PT191+CUDA113
27+
pytorch: "torch==1.9.1 torchvision==0.10.1 --extra-index-url https://download.pytorch.org/whl/cu113"
28+
base: "nvcr.io/nvidia/pytorch:21.06-py3" # CUDA 11.3
29+
- environment: PT110+CUDA113
30+
pytorch: "torch==1.10.2 torchvision==0.11.3 --extra-index-url https://download.pytorch.org/whl/cu113"
31+
base: "nvcr.io/nvidia/pytorch:21.06-py3" # CUDA 11.3
32+
- environment: PT112+CUDA113
33+
pytorch: "torch==1.12.1 torchvision==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu113"
34+
base: "nvcr.io/nvidia/pytorch:21.06-py3" # CUDA 11.3
35+
- environment: PTLATEST+CUDA117
36+
pytorch: "-U torch torchvision --extra-index-url https://download.pytorch.org/whl/cu117"
37+
base: "nvcr.io/nvidia/pytorch:22.08-py3" # CUDA 11.7
1238
container:
13-
image: nvcr.io/nvidia/pytorch:21.06-py3 # CUDA 11.3
39+
image: ${{ matrix.base }}
1440
options: "--gpus all"
1541
runs-on: [self-hosted, linux, x64, common]
16-
strategy:
17-
matrix:
18-
pytorch-version: [1.7.1, 1.8.1, 1.9.1, 1.10.2, latest]
1942
steps:
2043
- uses: actions/checkout@v3
44+
- name: apt install
45+
run: |
46+
# FIXME: workaround for https://github.com/Project-MONAI/MONAI/issues/4200
47+
apt-key del 7fa2af80 && rm -rf /etc/apt/sources.list.d/nvidia-ml.list /etc/apt/sources.list.d/cuda.list
48+
apt-get update
49+
apt-get install -y wget
50+
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-keyring_1.0-1_all.deb
51+
dpkg -i cuda-keyring_1.0-1_all.deb
52+
53+
if [ ${{ matrix.environment }} = "PT182+CUDA102" ]
54+
then
55+
PYVER=3.7 PYSFX=3 DISTUTILS=python3-distutils && \
56+
apt-get update && apt-get install -y --no-install-recommends \
57+
curl \
58+
pkg-config \
59+
python$PYVER \
60+
python$PYVER-dev \
61+
python$PYSFX-pip \
62+
$DISTUTILS \
63+
rsync \
64+
swig \
65+
unzip \
66+
zip \
67+
zlib1g-dev \
68+
libboost-locale-dev \
69+
libboost-program-options-dev \
70+
libboost-system-dev \
71+
libboost-thread-dev \
72+
libboost-test-dev \
73+
libgoogle-glog-dev \
74+
libjsoncpp-dev \
75+
cmake \
76+
git && \
77+
rm -rf /var/lib/apt/lists/* && \
78+
export PYTHONIOENCODING=utf-8 LC_ALL=C.UTF-8 && \
79+
rm -f /usr/bin/python && \
80+
rm -f /usr/bin/python`echo $PYVER | cut -c1-1` && \
81+
ln -s /usr/bin/python$PYVER /usr/bin/python && \
82+
ln -s /usr/bin/python$PYVER /usr/bin/python`echo $PYVER | cut -c1-1` &&
83+
curl -O https://bootstrap.pypa.io/get-pip.py && \
84+
python get-pip.py && \
85+
rm get-pip.py;
86+
fi
2187
- name: Install the dependencies
2288
run: |
2389
which python
2490
python -m pip install --upgrade pip wheel
2591
python -m pip uninstall -y torch torchvision
26-
if [ ${{ matrix.pytorch-version }} == "latest" ]; then
27-
python -m pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cu113
28-
elif [ ${{ matrix.pytorch-version }} == "1.7.1" ]; then
29-
python -m pip install torch==1.7.1 torchvision==0.8.2 --extra-index-url https://download.pytorch.org/whl/cu113
30-
elif [ ${{ matrix.pytorch-version }} == "1.8.1" ]; then
31-
python -m pip install torch==1.8.1 torchvision==0.9.1 --extra-index-url https://download.pytorch.org/whl/cu113
32-
elif [ ${{ matrix.pytorch-version }} == "1.9.1" ]; then
33-
python -m pip install torch==1.9.1 torchvision==0.10.1 --extra-index-url https://download.pytorch.org/whl/cu113
34-
elif [ ${{ matrix.pytorch-version }} == "1.10.2" ]; then
35-
python -m pip install torch==1.10.2 torchvision==0.11.3 --extra-index-url https://download.pytorch.org/whl/cu113
36-
fi
92+
python -m pip install ${{ matrix.pytorch }}
3793
python -m pip install -r requirements-dev.txt
3894
python -m pip list
3995
- name: Run tests report coverage
@@ -52,21 +108,22 @@ jobs:
52108
BUILD_MONAI=1 ./runtests.sh --build --coverage --net # integration tests with coverage report
53109
coverage xml --ignore-errors
54110
if pgrep python; then pkill python; fi
111+
shell: bash
55112
- name: Upload coverage
56-
uses: codecov/codecov-action@v1
113+
uses: codecov/codecov-action@v3
57114
with:
58115
fail_ci_if_error: false
59-
file: ./coverage.xml
116+
files: ./coverage.xml
60117

61118
cron-pt-image:
62119
if: github.repository == 'Project-MONAI/MONAI'
63120
strategy:
64121
matrix:
65-
container: ["pytorch:21.02", "pytorch:21.10", "pytorch:22.08"] # 21.02, 21.10 for backward comp.
122+
container: ["pytorch:21.02", "pytorch:21.10", "pytorch:22.10"] # 21.02, 21.10 for backward comp.
66123
container:
67124
image: nvcr.io/nvidia/${{ matrix.container }}-py3 # testing with the latest pytorch base image
68125
options: "--gpus all"
69-
runs-on: [self-hosted, linux, x64, common]
126+
runs-on: [self-hosted, linux, x64, integration]
70127
steps:
71128
- uses: actions/checkout@v3
72129
- name: Install APT dependencies
@@ -95,22 +152,23 @@ jobs:
95152
BUILD_MONAI=1 ./runtests.sh --build --coverage --net # integration tests with coverage report
96153
coverage xml --ignore-errors
97154
if pgrep python; then pkill python; fi
155+
shell: bash
98156
- name: Upload coverage
99-
uses: codecov/codecov-action@v1
157+
uses: codecov/codecov-action@v3
100158
with:
101159
fail_ci_if_error: false
102-
file: ./coverage.xml
160+
files: ./coverage.xml
103161

104162
cron-pip:
105163
# pip install monai[all] and use it to run unit tests
106164
if: github.repository == 'Project-MONAI/MONAI'
107165
strategy:
108166
matrix:
109-
container: ["pytorch:21.02", "pytorch:21.10", "pytorch:22.08"] # 21.02, 21.10 for backward comp.
167+
container: ["pytorch:21.02", "pytorch:21.10", "pytorch:22.10"] # 21.02, 21.10 for backward comp.
110168
container:
111169
image: nvcr.io/nvidia/${{ matrix.container }}-py3 # testing with the latest pytorch base image
112170
options: "--gpus all"
113-
runs-on: [self-hosted, linux, x64, common]
171+
runs-on: [self-hosted, linux, x64, integration]
114172
steps:
115173
- uses: actions/checkout@v3
116174
with:
@@ -121,6 +179,7 @@ jobs:
121179
python -m pip install --upgrade pip wheel twine
122180
python -m pip list
123181
- name: Run tests report coverage
182+
shell: bash
124183
run: |
125184
pip uninstall monai
126185
pip list | grep -iv monai
@@ -175,7 +234,7 @@ jobs:
175234
container:
176235
image: docker://projectmonai/monai:latest # this might be slow and has the pull count limitations
177236
options: "--gpus all"
178-
runs-on: [self-hosted, linux, x64, common]
237+
runs-on: [self-hosted, linux, x64, integration]
179238
steps:
180239
- name: Run tests report coverage
181240
# The docker image process has done the compilation.
@@ -194,19 +253,20 @@ jobs:
194253
BUILD_MONAI=1 ./runtests.sh --build --coverage --net # integration tests with coverage report
195254
coverage xml --ignore-errors
196255
if pgrep python; then pkill python; fi
256+
shell: bash
197257
- name: Upload coverage
198-
uses: codecov/codecov-action@v1
258+
uses: codecov/codecov-action@v3
199259
with:
200260
fail_ci_if_error: false
201-
file: ./coverage.xml
261+
files: ./coverage.xml
202262

203263
cron-tutorial-notebooks:
204264
if: github.repository == 'Project-MONAI/MONAI'
205265
needs: cron-gpu # so that monai itself is verified first
206266
container:
207-
image: nvcr.io/nvidia/pytorch:22.08-py3 # testing with the latest pytorch base image
267+
image: nvcr.io/nvidia/pytorch:22.10-py3 # testing with the latest pytorch base image
208268
options: "--gpus all --ipc=host"
209-
runs-on: [self-hosted, linux, x64, common]
269+
runs-on: [self-hosted, linux, x64, integration]
210270
steps:
211271
- uses: actions/checkout@v3
212272
- name: Install MONAI
@@ -219,7 +279,7 @@ jobs:
219279
nvidia-smi
220280
export CUDA_VISIBLE_DEVICES=$(python -m tests.utils | tail -n 1)
221281
echo $CUDA_VISIBLE_DEVICES
222-
echo "::set-output name=devices::$CUDA_VISIBLE_DEVICES"
282+
echo "devices=$CUDA_VISIBLE_DEVICES" >> $GITHUB_OUTPUT
223283
- name: Checkout tutorials and install their requirements
224284
run: |
225285
cd /opt
@@ -238,3 +298,4 @@ jobs:
238298
$(pwd)/runner.sh
239299
python -c 'import monai; monai.config.print_debug_info()'
240300
if pgrep python; then pkill python; fi
301+
shell: bash

.github/workflows/docker.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# this is the docker image releasing pipeline, pushing to https://hub.docker.com/r/projectmonai/monai
12
name: docker
23
# versioning: compute a static version file
34
# local_docker: use the version file to build docker images
@@ -25,9 +26,9 @@ jobs:
2526
ref: dev
2627
fetch-depth: 0
2728
- name: Set up Python 3.8
28-
uses: actions/setup-python@v3
29+
uses: actions/setup-python@v4
2930
with:
30-
python-version: 3.8
31+
python-version: '3.8'
3132
- shell: bash
3233
run: |
3334
git describe

.github/workflows/integration.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# manually trigger integration with the latest pytorch
12
name: integration
23

34
on:
@@ -7,9 +8,9 @@ on:
78
jobs:
89
integration-py3:
910
container:
10-
image: nvcr.io/nvidia/pytorch:22.04-py3 # CUDA 11.6
11+
image: nvcr.io/nvidia/pytorch:22.04-py3 # CUDA 11.6 py38
1112
options: --gpus all # shm-size 4g works fine
12-
runs-on: [self-hosted, linux, x64, common]
13+
runs-on: [self-hosted, linux, x64, integration]
1314
steps:
1415
# checkout the pull request branch
1516
- uses: actions/checkout@v3
@@ -20,7 +21,7 @@ jobs:
2021
- name: cache weekly timestamp
2122
id: pip-cache
2223
run: |
23-
echo "::set-output name=datew::$(date '+%Y-%V')"
24+
echo "datew=$(date '+%Y-%V')" >> $GITHUB_OUTPUT
2425
- name: cache for pip
2526
uses: actions/cache@v3
2627
id: cache
@@ -34,7 +35,7 @@ jobs:
3435
which python
3536
python -m pip install --upgrade pip wheel
3637
python -m pip uninstall -y torch torchvision
37-
python -m pip install torch==1.12.1+cu116 torchvision==0.13.1+cu116 -f https://download.pytorch.org/whl/torch_stable.html
38+
python -m pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cu116
3839
python -m pip install -r requirements-dev.txt
3940
rm -rf /github/home/.cache/torch/hub/mmars/
4041
- name: Run integration tests
@@ -53,6 +54,7 @@ jobs:
5354
shell: bash
5455
- name: Add reaction
5556
uses: peter-evans/create-or-update-comment@v1
57+
if: github.event.pull_request.number != ''
5658
with:
5759
token: ${{ secrets.PR_MAINTAIN }}
5860
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}

0 commit comments

Comments
 (0)