From 1cd0d7baedb460d8fd475d95cc802e2d3b140f7b Mon Sep 17 00:00:00 2001 From: YanxuanLiu <104543031+YanxuanLiu@users.noreply.github.com> Date: Thu, 23 Mar 2023 22:17:20 +0800 Subject: [PATCH] upgrade pytorch version (#6228) Fixes #6221 ### Description Upgrade Pytorch version to 23.02 ### Types of changes - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. --------- Signed-off-by: YanxuanLiu Signed-off-by: Wenqi Li Co-authored-by: Wenqi Li --- .github/workflows/cron.yml | 9 ++++----- .github/workflows/pythonapp-gpu.yml | 4 ++++ .readthedocs.yml | 2 +- Dockerfile | 2 +- tests/test_dynunet.py | 2 +- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index e692c6eab3..88f4522b5b 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -30,7 +30,7 @@ jobs: base: "nvcr.io/nvidia/pytorch:21.06-py3" # CUDA 11.3 - environment: PTLATEST+CUDA118 pytorch: "-U torch torchvision --extra-index-url https://download.pytorch.org/whl/cu118" - base: "nvcr.io/nvidia/pytorch:22.12-py3" # CUDA 11.8 + base: "nvcr.io/nvidia/pytorch:23.02-py3" # CUDA 11.8 container: image: ${{ matrix.base }} options: "--gpus all" @@ -39,7 +39,6 @@ jobs: - uses: actions/checkout@v3 - name: apt install run: | - # FIXME: workaround for https://github.com/Project-MONAI/MONAI/issues/4200 apt-get update apt-get install -y wget - name: Install the dependencies @@ -77,7 +76,7 @@ jobs: if: github.repository == 'Project-MONAI/MONAI' strategy: matrix: - container: ["pytorch:22.09", "pytorch:22.11", "pytorch:22.12"] + container: ["pytorch:22.09", "pytorch:22.11", "pytorch:23.02"] container: image: nvcr.io/nvidia/${{ matrix.container }}-py3 # testing with the latest pytorch base image options: "--gpus all" @@ -122,7 +121,7 @@ jobs: if: github.repository == 'Project-MONAI/MONAI' strategy: matrix: - container: ["pytorch:22.09", "pytorch:22.11", "pytorch:22.12"] + container: ["pytorch:22.09", "pytorch:22.11", "pytorch:23.02"] container: image: nvcr.io/nvidia/${{ matrix.container }}-py3 # testing with the latest pytorch base image options: "--gpus all" @@ -222,7 +221,7 @@ jobs: if: github.repository == 'Project-MONAI/MONAI' needs: cron-gpu # so that monai itself is verified first container: - image: nvcr.io/nvidia/pytorch:22.12-py3 # testing with the latest pytorch base image + image: nvcr.io/nvidia/pytorch:23.02-py3 # testing with the latest pytorch base image options: "--gpus all --ipc=host" runs-on: [self-hosted, linux, x64, integration] steps: diff --git a/.github/workflows/pythonapp-gpu.yml b/.github/workflows/pythonapp-gpu.yml index 589631d2e4..acbd6c648d 100644 --- a/.github/workflows/pythonapp-gpu.yml +++ b/.github/workflows/pythonapp-gpu.yml @@ -41,6 +41,10 @@ jobs: - environment: PT113+CUDA116 pytorch: "torch==1.13.1 torchvision==0.14.1" base: "nvcr.io/nvidia/cuda:11.6.1-devel-ubuntu18.04" + - environment: PT114+CUDA120DOCKER + # 23.02: 1.14.0a0+44dac51 + pytorch: "-h" # we explicitly set pytorch to -h to avoid pip install error + base: "nvcr.io/nvidia/pytorch:23.02-py3" container: image: ${{ matrix.base }} options: --gpus all --env NVIDIA_DISABLE_REQUIRE=true # workaround for unsatisfied condition: cuda>=11.6 diff --git a/.readthedocs.yml b/.readthedocs.yml index fd21323127..23277a5360 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -18,7 +18,7 @@ sphinx: # Optionally set the version of Python and requirements required to build your docs python: - version: 3.8 + version: 3 install: - requirements: docs/requirements.txt # system_packages: true diff --git a/Dockerfile b/Dockerfile index 9ce222fd15..9bc0eee70c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ # To build with a different base image # please run `docker build` using the `--build-arg PYTORCH_IMAGE=...` flag. -ARG PYTORCH_IMAGE=nvcr.io/nvidia/pytorch:22.12-py3 +ARG PYTORCH_IMAGE=nvcr.io/nvidia/pytorch:23.02-py3 FROM ${PYTORCH_IMAGE} LABEL maintainer="monai.contact@gmail.com" diff --git a/tests/test_dynunet.py b/tests/test_dynunet.py index 68694d8983..c31ebeb8f9 100644 --- a/tests/test_dynunet.py +++ b/tests/test_dynunet.py @@ -124,7 +124,7 @@ def test_script(self): # @skip_if_no_cuda # @skip_if_windows -@unittest.skip("temporary skip for 22.12") +@unittest.skip("temporary skip for 22.12/23.02") class TestDynUNetWithInstanceNorm3dNVFuser(unittest.TestCase): @parameterized.expand([TEST_CASE_DYNUNET_3D[0]]) def test_consistency(self, input_param, input_shape, _):