Skip to content

Commit 47625db

Browse files
committed
Fix numpy vulnerability: CVE-2021-33430
Signed-off-by: Gigon Bae <gbae@nvidia.com>
1 parent 174b3eb commit 47625db

File tree

11 files changed

+15
-15
lines changed

11 files changed

+15
-15
lines changed

docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Sphinx==4.1.2
22
sphinx-autobuild==2021.3.14
33
myst-parser==0.15.2
4-
numpy==1.19.5
4+
numpy==1.21 # CVE-2021-33430
55
matplotlib==3.3.4
66
ipywidgets==7.6.4
77
pandas==1.1.5

examples/apps/ai_livertumor_seg_app/livertumor_seg_operator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
@md.input("image", Image, IOType.IN_MEMORY)
3535
@md.output("seg_image", Image, IOType.IN_MEMORY)
3636
@md.output("saved_images_folder", DataPath, IOType.DISK)
37-
@md.env(pip_packages=["monai==0.6.0", "torch>=1.5", "numpy>=1.20", "nibabel"])
37+
@md.env(pip_packages=["monai==0.6.0", "torch>=1.5", "numpy>=1.21", "nibabel"])
3838
class LiverTumorSegOperator(Operator):
3939
"""Performs liver and tumor segmentation using a DL model with an image converted from a DICOM CT series.
4040

examples/apps/ai_spleen_seg_app/spleen_seg_operator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
@md.input("image", Image, IOType.IN_MEMORY)
3636
@md.output("seg_image", Image, IOType.IN_MEMORY)
37-
@md.env(pip_packages=["monai==0.6.0", "torch>=1.5", "numpy>=1.20", "nibabel"])
37+
@md.env(pip_packages=["monai==0.6.0", "torch>=1.5", "numpy>=1.21", "nibabel"])
3838
class SpleenSegOperator(Operator):
3939
"""Performs Spleen segmentation with a 3D image converted from a DICOM CT series.
4040

examples/apps/ai_unetr_seg_app/unetr_seg_operator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
@md.input("image", Image, IOType.IN_MEMORY)
3636
@md.output("seg_image", Image, IOType.IN_MEMORY)
3737
@md.output("saved_images_folder", DataPath, IOType.DISK)
38-
@md.env(pip_packages=["monai==0.6.0", "torch>=1.5", "numpy>=1.20", "nibabel"])
38+
@md.env(pip_packages=["monai==0.6.0", "torch>=1.5", "numpy>=1.21", "nibabel"])
3939
class UnetrSegOperator(Operator):
4040
"""Performs multi-organ segmentation using UNETR model with an image converted from a DICOM CT series.
4141

examples/apps/deply_app_on_aarch64_interim.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Without using the MONAI Deploy App SDK Packager to automatically detect the depe
3131
monai>=0.6.0
3232
monai-deploy-app-sdk>=0.1.0
3333
nibabel
34-
numpy>=1.20
34+
numpy>=1.21
3535
pydicom>=1.4.2
3636
torch>=1.5
3737
```

monai/deploy/operators/monai_seg_inference_operator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
@md.input("image", Image, IOType.IN_MEMORY)
4545
@md.output("seg_image", Image, IOType.IN_MEMORY)
46-
@md.env(pip_packages=["monai==0.6.0", "torch>=1.5", "numpy>=1.20"])
46+
@md.env(pip_packages=["monai==0.6.0", "torch>=1.5", "numpy>=1.21"])
4747
class MonaiSegInferenceOperator(InferenceOperator):
4848
"""This segmentation operator uses MONAI transforms and Sliding Window Inference.
4949

monai/deploy/packager/templates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
COMMON_FOOTPRINT = """
1313
USER root
1414
15-
RUN pip install --no-cache-dir --upgrade setuptools==57.4.0 pip==21.2.4 wheel==0.37.0 monai-deploy-app-sdk==0.2.0
15+
RUN pip install --no-cache-dir --upgrade setuptools==57.4.0 pip==21.2.4 wheel==0.37.0 numpy>=1.21
1616
1717
RUN mkdir -p /etc/monai/ \\
1818
&& mkdir -p /opt/monai/ \\

notebooks/tutorials/03_segmentation_app.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
"# Install MONAI and other necessary image processing packages for the application\n",
100100
"!python -c \"import monai\" || pip install -q \"monai\"\n",
101101
"!python -c \"import torch\" || pip install -q \"torch>=1.5\"\n",
102-
"!python -c \"import numpy\" || pip install -q \"numpy>=1.20\"\n",
102+
"!python -c \"import numpy\" || pip install -q \"numpy>=1.21\"\n",
103103
"!python -c \"import nibabel\" || pip install -q \"nibabel>=3.2.1\"\n",
104104
"!python -c \"import pydicom\" || pip install -q \"pydicom>=1.4.2\"\n",
105105
"!python -c \"import SimpleITK\" || pip install -q \"SimpleITK>=2.0.0\"\n",
@@ -747,7 +747,7 @@
747747
"source": [
748748
"@md.input(\"image\", Image, IOType.IN_MEMORY)\n",
749749
"@md.output(\"seg_image\", Image, IOType.IN_MEMORY)\n",
750-
"@md.env(pip_packages=[\"monai==0.6.0\", \"torch>=1.5\", \"numpy>=1.20\", \"nibabel\"])\n",
750+
"@md.env(pip_packages=[\"monai==0.6.0\", \"torch>=1.5\", \"numpy>=1.21\", \"nibabel\"])\n",
751751
"class SpleenSegOperator(Operator):\n",
752752
" \"\"\"Performs Spleen segmentation with a 3D image converted from a DICOM CT series.\n",
753753
" \"\"\"\n",
@@ -1069,7 +1069,7 @@
10691069
"\n",
10701070
"@md.input(\"image\", Image, IOType.IN_MEMORY)\n",
10711071
"@md.output(\"seg_image\", Image, IOType.IN_MEMORY)\n",
1072-
"@md.env(pip_packages=[\"monai==0.6.0\", \"torch>=1.5\", \"numpy>=1.20\", \"nibabel\", \"typeguard\"])\n",
1072+
"@md.env(pip_packages=[\"monai==0.6.0\", \"torch>=1.5\", \"numpy>=1.21\", \"nibabel\", \"typeguard\"])\n",
10731073
"class SpleenSegOperator(Operator):\n",
10741074
" \"\"\"Performs Spleen segmentation with a 3D image converted from a DICOM CT series.\n",
10751075
" \"\"\"\n",

notebooks/tutorials/05_full_tutorial.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
"# Install MONAI and other necessary image processing packages for the application\n",
9090
"!python -c \"import monai\" || pip install -q \"monai\"\n",
9191
"!python -c \"import torch\" || pip install -q \"torch>=1.5\"\n",
92-
"!python -c \"import numpy\" || pip install -q \"numpy>=1.20\"\n",
92+
"!python -c \"import numpy\" || pip install -q \"numpy>=1.21\"\n",
9393
"!python -c \"import nibabel\" || pip install -q \"nibabel>=3.2.1\"\n",
9494
"!python -c \"import pydicom\" || pip install -q \"pydicom>=1.4.2\"\n",
9595
"!python -c \"import SimpleITK\" || pip install -q \"SimpleITK>=2.0.0\"\n",
@@ -739,7 +739,7 @@
739739
"source": [
740740
"@md.input(\"image\", Image, IOType.IN_MEMORY)\n",
741741
"@md.output(\"seg_image\", Image, IOType.IN_MEMORY)\n",
742-
"@md.env(pip_packages=[\"monai==0.6.0\", \"torch>=1.5\", \"numpy>=1.20\", \"nibabel\"])\n",
742+
"@md.env(pip_packages=[\"monai==0.6.0\", \"torch>=1.5\", \"numpy>=1.21\", \"nibabel\"])\n",
743743
"class SpleenSegOperator(Operator):\n",
744744
" \"\"\"Performs Spleen segmentation with a 3D image converted from a DICOM CT series.\n",
745745
" \"\"\"\n",
@@ -1017,7 +1017,7 @@
10171017
"\n",
10181018
"@md.input(\"image\", Image, IOType.IN_MEMORY)\n",
10191019
"@md.output(\"seg_image\", Image, IOType.IN_MEMORY)\n",
1020-
"@md.env(pip_packages=[\"monai==0.6.0\", \"torch>=1.5\", \"numpy>=1.20\", \"nibabel\", \"typeguard\"])\n",
1020+
"@md.env(pip_packages=[\"monai==0.6.0\", \"torch>=1.5\", \"numpy>=1.21\", \"nibabel\", \"typeguard\"])\n",
10211021
"class SpleenSegOperator(Operator):\n",
10221022
" \"\"\"Performs Spleen segmentation with a 3D image converted from a DICOM CT series.\n",
10231023
" \"\"\"\n",

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
numpy>=1.17
1+
numpy>=1.21 # CVE-2021-33430
22
networkx>=2.4
33
colorama>=0.4.1
44
typeguard>=2.12.1

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ python_requires = >= 3.7
2323
# setup_requires =
2424
# cucim
2525
install_requires =
26-
numpy>=1.17
26+
numpy>=1.21 # CVE-2021-33430
2727
networkx>=2.4
2828
colorama>=0.4.1
2929
typeguard>=2.12.1

0 commit comments

Comments
 (0)