Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,21 @@ RUN if [[ $(uname -m) =~ "aarch64" ]]; then \

WORKDIR /opt/monai

# Patch NVIDIA's pip constraint file:
# - keep numpy==1.26.4 pin (PyTorch nv25.12 was compiled against NumPy 1.x)
# - add setuptools<71 (newer setuptools removed pkg_resources needed by legacy setup.py)
# - remove jupytext/isort pins so the tutorial runner can install its required versions
RUN grep '^numpy==' /etc/pip/constraint.txt > /tmp/new_constraints.txt \
&& printf 'setuptools<71\n' >> /tmp/new_constraints.txt \
&& cp /tmp/new_constraints.txt /etc/pip/constraint.txt

# install full deps
COPY requirements.txt requirements-min.txt requirements-dev.txt /tmp/
RUN cp /tmp/requirements.txt /tmp/req.bak \
&& awk '!/torch/' /tmp/requirements.txt > /tmp/tmp && mv /tmp/tmp /tmp/requirements.txt \
&& python -m pip install --upgrade --no-cache-dir --no-build-isolation pip wheel wheel-stub \
&& python -m pip install --no-cache-dir --no-build-isolation -r /tmp/requirements-dev.txt
&& python -m pip install --no-cache-dir --no-build-isolation -r /tmp/requirements-dev.txt \
&& python -m pip install --no-cache-dir --no-build-isolation papermill jupytext autopep8 autoflake ipywidgets

# compile ext and remove temp files
# TODO: remark for issue [revise the dockerfile #1276](https://github.com/Project-MONAI/MONAI/issues/1276)
Expand Down
7 changes: 5 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ black>=26.3.1
isort>=5.1, <6, !=6.0.0
ruff>=0.14.11,<0.15
pybind11
setuptools<71 # pkg_resources removed in setuptools>=71; needed by MetricsReloaded setup.py
types-setuptools
mypy>=1.5.0, <1.12.0
ninja
Expand All @@ -33,9 +34,11 @@ tifffile; platform_system == "Linux" or platform_system == "Darwin"
pandas
requests
einops
transformers>=4.53.0
mlflow>=2.12.2,<3.13
transformers>=4.53.0, <5.0 # 5.x references torch.float8_e8m0fnu absent in older PyTorch builds
mlflow>=2.12.2, <3.0 # 3.x broken on Python 3.12 (relative import in mlflow.utils.uv_utils)
clearml>=1.10.0rc0
aim; platform_system == "Linux" # experiment tracking backend for spleen_segmentation_aim tutorial
lightning>=2.0 # PyTorch Lightning for lightning-based training tutorials
matplotlib>=3.6.3
tensorboardX
types-PyYAML
Expand Down
Loading