From 9b95daf9d2c7f15c5b6039be31cc0e37f056f925 Mon Sep 17 00:00:00 2001 From: "R. Garcia-Dias" Date: Wed, 18 Nov 2026 15:33:28 +0000 Subject: [PATCH 1/3] fix: resolve open Dependabot alerts and drop Python 3.10 Upgrade axios to ^0.33.0 in both OHIF plugins and @babel/core to 7.29.6 in the OHIF v3 mode. Upgrade filelock to 4.2.1; all patched filelock releases require Python >= 3.11, so drop Python 3.10 support in setup.cfg, CI, the Dockerfile, Read the Docs config and the installation docs. Signed-off-by: R. Garcia-Dias --- .github/workflows/docker-plugin.yml | 4 ++-- .github/workflows/pythonapp.yml | 8 ++++---- .github/workflows/release.yml | 4 ++-- .readthedocs.yml | 2 +- Dockerfile | 2 +- docs/source/installation.rst | 2 +- plugins/ohif/monai-label/package.json | 2 +- plugins/ohifv3/extensions/monai-label/package.json | 2 +- plugins/ohifv3/modes/monai-label/package.json | 2 +- requirements.txt | 2 +- setup.cfg | 4 ++-- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/docker-plugin.yml b/.github/workflows/docker-plugin.yml index 60e10e546..acab2bd41 100644 --- a/.github/workflows/docker-plugin.yml +++ b/.github/workflows/docker-plugin.yml @@ -26,10 +26,10 @@ jobs: MONAI_ZOO_AUTH_TOKEN: ${{ github.token }} steps: - uses: actions/checkout@v7 - - name: Set up Python 3.10 + - name: Set up Python 3.11 uses: actions/setup-python@v7 with: - python-version: 3.10 + python-version: "3.11" - name: clean up run: | sudo rm -rf /usr/share/dotnet diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index 90d47aea6..becda1c8f 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -32,7 +32,7 @@ jobs: strategy: matrix: os: [windows-latest, ubuntu-latest] - python-version: ["3.10", "3.11", "3.12"] + python-version: ["3.11", "3.12"] steps: - uses: actions/checkout@v7 - name: Set up Python @@ -54,7 +54,7 @@ jobs: MONAI_ZOO_AUTH_TOKEN: ${{ github.token }} strategy: matrix: - python-version: ["3.10", "3.11", "3.12"] + python-version: ["3.11", "3.12"] steps: - uses: actions/checkout@v7 - name: Set up Python @@ -90,7 +90,7 @@ jobs: MONAI_ZOO_AUTH_TOKEN: ${{ github.token }} strategy: matrix: - python-version: ["3.10", "3.11", "3.12"] + python-version: ["3.11", "3.12"] steps: - uses: actions/checkout@v7 with: @@ -152,7 +152,7 @@ jobs: MONAI_ZOO_AUTH_TOKEN: ${{ github.token }} strategy: matrix: - python-version: ["3.10"] + python-version: ["3.11"] steps: - uses: actions/checkout@v7 - name: Set up Python diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d788ffe31..33220873c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,10 +35,10 @@ jobs: with: fetch-depth: 0 - uses: actions/setup-node@v7 - - name: Set up Python 3.10 + - name: Set up Python 3.11 uses: actions/setup-python@v7 with: - python-version: 3.10 + python-version: "3.11" - name: Cache for pip uses: actions/cache@v6 id: cache diff --git a/.readthedocs.yml b/.readthedocs.yml index 76aef6d84..15d56852c 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -20,7 +20,7 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.10" + python: "3.11" # Build documentation in the docs/ directory with Sphinx sphinx: diff --git a/Dockerfile b/Dockerfile index cf02e489e..084a12a14 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,7 @@ #ARG FINAL_IMAGE=pytorch/pytorch:2.5.1-cuda12.4-cudnn9-runtime ARG FINAL_IMAGE=ubuntu:22.04 -ARG BUILD_IMAGE=python:3.10 +ARG BUILD_IMAGE=python:3.11 ARG NODE_IMAGE=node:slim # Phase1: Build OHIF Viewer diff --git a/docs/source/installation.rst b/docs/source/installation.rst index 7990b1993..e6a3a7628 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -52,7 +52,7 @@ Prerequisites -------------------------- MONAI Label supports both **Ubuntu** and **Windows** OS with GPU/CUDA enabled. -Make sure you have python 3.10+ version environment with PyTorch and CUDA installed. MONAI Label features on other python version are not verified. +Make sure you have python 3.11+ version environment with PyTorch and CUDA installed. MONAI Label features on other python version are not verified. - Install `Python `_ - Install the following Python libraries diff --git a/plugins/ohif/monai-label/package.json b/plugins/ohif/monai-label/package.json index 5d9dd54dc..a2fa975f1 100644 --- a/plugins/ohif/monai-label/package.json +++ b/plugins/ohif/monai-label/package.json @@ -38,7 +38,7 @@ }, "dependencies": { "@babel/runtime": "^7.5.5", - "axios": "^0.21.1", + "axios": "^0.33.0", "arraybuffer-concat": "^0.0.1", "ndarray": "^1.0.19", "md5.js": "^1.3.5", diff --git a/plugins/ohifv3/extensions/monai-label/package.json b/plugins/ohifv3/extensions/monai-label/package.json index 9472d5975..5d5e511cb 100644 --- a/plugins/ohifv3/extensions/monai-label/package.json +++ b/plugins/ohifv3/extensions/monai-label/package.json @@ -52,7 +52,7 @@ "@kitware/vtk.js": "32.12.0", "react-color": "^2.19.3", "md5.js": "^1.3.5", - "axios": "^0.21.1", + "axios": "^0.33.0", "arraybuffer-concat": "^0.0.1", "ndarray": "^1.0.19", "nrrd-js": "^0.2.1", diff --git a/plugins/ohifv3/modes/monai-label/package.json b/plugins/ohifv3/modes/monai-label/package.json index 0fed81295..e97eb8029 100644 --- a/plugins/ohifv3/modes/monai-label/package.json +++ b/plugins/ohifv3/modes/monai-label/package.json @@ -42,7 +42,7 @@ "i18next": "^17.0.3" }, "devDependencies": { - "@babel/core": "7.24.7", + "@babel/core": "7.29.6", "@babel/plugin-proposal-class-properties": "^7.16.7", "@babel/plugin-proposal-object-rest-spread": "^7.17.3", "@babel/plugin-proposal-private-methods": "^7.18.6", diff --git a/requirements.txt b/requirements.txt index 747f5d7d6..a5e72255e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -38,7 +38,7 @@ girder-client==3.2.3 ninja==1.11.1.1 einops==0.7.0 pyyaml==6.0.1 -filelock==3.20.3 +filelock==4.2.1 passlib==1.7.4 pyjwt==2.15.0 bcrypt==4.1.2 diff --git a/setup.cfg b/setup.cfg index a1a846106..bfd32c38b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -27,7 +27,7 @@ project_urls = Source Code=https://github.com/Project-MONAI/MONAILabel [options] -python_requires = >= 3.10 +python_requires = >= 3.11 # for compiling and develop setup only # no need to specify the versions so that we could # compile for multiple targeted versions. @@ -61,7 +61,7 @@ install_requires = ninja>=1.11.1.1 einops>=0.7.0 pyyaml>=6.0.1 - filelock>=3.11.0 + filelock>=4.2.1 passlib>=1.7.4 pyjwt>=2.8.0 bcrypt>=4.1.2 From 3e22b425e80b146a25743d811cdbae00ceab0fd9 Mon Sep 17 00:00:00 2001 From: "R. Garcia-Dias" Date: Wed, 18 Nov 2026 15:38:51 +0000 Subject: [PATCH 2/3] ci: keep setup-python interpreter when clearing the tool cache The workflows deleted /opt/hostedtoolcache after actions/setup-python had installed the requested interpreter into it, so every job silently fell back to the runner's system Python (now 3.14). shapely 2.0.4 has no wheel for 3.14 and its sdist build fails with current setuptools. Only remove the non-Python entries from the tool cache. Signed-off-by: R. Garcia-Dias --- .github/workflows/docker-plugin.yml | 3 ++- .github/workflows/docker.yml | 3 ++- .github/workflows/pythonapp.yml | 12 ++++++++---- .github/workflows/release.yml | 3 ++- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker-plugin.yml b/.github/workflows/docker-plugin.yml index acab2bd41..74a1b07d4 100644 --- a/.github/workflows/docker-plugin.yml +++ b/.github/workflows/docker-plugin.yml @@ -39,7 +39,8 @@ jobs: python -m pip install --upgrade pip wheel - name: Build run: | - rm -rf /opt/hostedtoolcache + # keep the interpreter installed by setup-python; drop the rest of the tool cache to free disk + find /opt/hostedtoolcache -mindepth 1 -maxdepth 1 ! -name Python -exec rm -rf {} + docker --version cd plugins/dsa docker system prune -f diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 2de189cf5..b2c071f62 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -33,7 +33,8 @@ jobs: echo Before Cleanup... df -h sudo rm -rf "$AGENT_TOOLSDIRECTORY" - rm -rf /opt/hostedtoolcache + # keep the interpreter installed by setup-python; drop the rest of the tool cache to free disk + find /opt/hostedtoolcache -mindepth 1 -maxdepth 1 ! -name Python -exec rm -rf {} + rm -rf /usr/share/dotnet/ cd /opt find . -maxdepth 1 -mindepth 1 '!' -path ./containerd '!' -path ./actionarchivecache '!' -path ./runner '!' -path ./runner-cache -exec rm -rf '{}' ';' diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index becda1c8f..de75ab215 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -42,7 +42,8 @@ jobs: - if: runner.os == 'Linux' name: Cleanup (Linux only) run: | - rm -rf /opt/hostedtoolcache + # keep the interpreter installed by setup-python; drop the rest of the tool cache to free disk + find /opt/hostedtoolcache -mindepth 1 -maxdepth 1 ! -name Python -exec rm -rf {} + - name: Install dependencies run: | python -m pip install --upgrade pip setuptools wheel @@ -63,7 +64,8 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - rm -rf /opt/hostedtoolcache + # keep the interpreter installed by setup-python; drop the rest of the tool cache to free disk + find /opt/hostedtoolcache -mindepth 1 -maxdepth 1 ! -name Python -exec rm -rf {} + sudo apt-get install openslide-tools -y python -m pip install --upgrade pip wheel pip install -r requirements-dev.txt @@ -114,7 +116,8 @@ jobs: key: ${{ runner.os }}-pip-${{ steps.pip-cache.outputs.datew }} - name: Install dependencies run: | - rm -rf /opt/hostedtoolcache + # keep the interpreter installed by setup-python; drop the rest of the tool cache to free disk + find /opt/hostedtoolcache -mindepth 1 -maxdepth 1 ! -name Python -exec rm -rf {} + sudo apt-get install openslide-tools -y python -m pip install --user --upgrade pip setuptools wheel python -m pip install torch torchvision @@ -173,7 +176,8 @@ jobs: key: ${{ runner.os }}-pip-${{ steps.pip-cache.outputs.datew }} - name: Install dependencies run: | - rm -rf /opt/hostedtoolcache + # keep the interpreter installed by setup-python; drop the rest of the tool cache to free disk + find /opt/hostedtoolcache -mindepth 1 -maxdepth 1 ! -name Python -exec rm -rf {} + sudo apt-get install openslide-tools -y python -m pip install --upgrade pip wheel python -m pip install -r docs/requirements.txt diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 33220873c..89da21d5f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,7 +49,8 @@ jobs: key: ${{ runner.os }}-pip-${{ steps.pip-cache.outputs.datew }} - name: Install dependencies run: | - rm -rf /opt/hostedtoolcache + # keep the interpreter installed by setup-python; drop the rest of the tool cache to free disk + find /opt/hostedtoolcache -mindepth 1 -maxdepth 1 ! -name Python -exec rm -rf {} + sudo apt-get install openslide-tools -y python -m pip install --user --upgrade pip setuptools wheel python -m pip install torch torchvision From e4ee5aa0d7136d1db14b588bda74a6f2794fa79d Mon Sep 17 00:00:00 2001 From: "R. Garcia-Dias" Date: Wed, 18 Nov 2026 15:46:04 +0000 Subject: [PATCH 3/3] fix: bump girder-client to 3.2.9 for setuptools without pkg_resources girder-client 3.2.3 imports pkg_resources at module load, which setuptools 81+ no longer ships, so importing monailabel.interfaces.app fails on fresh environments. 3.2.9 no longer depends on pkg_resources and keeps the same client API. Signed-off-by: R. Garcia-Dias --- requirements.txt | 2 +- setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index a5e72255e..5a0729da8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -34,7 +34,7 @@ huggingface_hub numpymaxflow==0.0.7; python_version < "3.13" setuptools>=61 setuptools-scm<8.0.0 -girder-client==3.2.3 +girder-client==3.2.9 ninja==1.11.1.1 einops==0.7.0 pyyaml==6.0.1 diff --git a/setup.cfg b/setup.cfg index bfd32c38b..0745b5f93 100644 --- a/setup.cfg +++ b/setup.cfg @@ -57,7 +57,7 @@ install_requires = SimpleITK pyOpenSSL>=26.0.0 huggingface_hub - girder-client>=3.2.3 + girder-client>=3.2.9 ninja>=1.11.1.1 einops>=0.7.0 pyyaml>=6.0.1