7575 - name : Install dependencies
7676 run : |
7777 python -m pip install --upgrade pip wheel
78- python -m pip install --no-build-isolation -r requirements-dev.txt
78+ python -m pip install .[all,testing]
7979 - name : Lint and type check
8080 run : |
8181 # clean up temporary files
@@ -137,15 +137,14 @@ jobs:
137137 - name : Prepare pip wheel
138138 run : |
139139 which python
140- python -m pip install --upgrade pip wheel
141- python -m pip install --user more-itertools>=8.0
140+ python -m pip install --upgrade pip wheel tomli
142141 - name : Install the minimum dependencies
143142 run : |
144143 # min. requirements
145144 python -m pip install torch==${{ matrix.pytorch-version }}
146- python -m pip install -r requirements-min.txt
145+ python monai/config/print_dependencies.py build-system | xargs pip install --no-build-isolation
146+ python -m pip install --no-build-isolation .[testing]
147147 python -m pip list
148- BUILD_MONAI=0 python setup.py develop # no compile of extensions
149148 shell : bash
150149 - if : matrix.os == 'linux-gpu-runner'
151150 name : Print GPU Info
@@ -218,16 +217,17 @@ jobs:
218217 shell : bash
219218 - name : Install the complete dependencies
220219 run : |
221- python -m pip install --user --upgrade pip wheel pybind11 # TODO: pybind11 added for macOS, may not be needed
222- cat "requirements-dev.txt"
223- python -m pip install --no-build-isolation -r requirements-dev.txt
220+ python -m pip install --user --upgrade pip wheel tomli
221+ python monai/config/print_dependencies.py build-system | xargs pip install --no-build-isolation
222+ python -m pip install --no-build-isolation .[all,testing]
224223 python -m pip list
225- python -m pip install --no-build-isolation -e . # test no compile installation
226224 shell : bash
227225 - name : Run compiled (${{ runner.os }})
228226 run : |
229227 python -m pip uninstall -y monai
230- BUILD_MONAI=1 python -m pip install --no-build-isolation -e . # compile the cpp extensions
228+ BUILD_MONAI=1 python -m pip install --no-build-isolation -e . # compile the cpp extensions in-place with -e
229+ # ensure extensions were compiled
230+ python -c 'import monai._C' > /dev/null
231231 shell : bash
232232 - if : runner.os != 'macOS'
233233 name : Run full tests
@@ -274,14 +274,15 @@ jobs:
274274 cache : ' pip'
275275 - name : Install dependencies + nvsubquadratic (no-deps)
276276 run : |
277- python -m pip install --upgrade pip wheel
278- python -m pip install torch==${PYTORCH_VER1} torchvision==${TORCHVISION_VER1}
279- python -m pip install --no-build-isolation -r requirements-dev.txt
280- python -m pip install -e .
281- # nvsubquadratic runtime imports need only torch + einops + omegaconf; install
282- # the package itself without its core dependency tree (see job comment above).
283- python -m pip install omegaconf
284- python -m pip install --no-deps 'nvsubquadratic>=0.1.1'
277+ python -m pip install --upgrade pip wheel tomli pytest
278+ # need a specific version of torch for nvsubquadratic
279+ python monai/config/print_dependencies.py build-system | \
280+ xargs -d '\n' pip install --no-build-isolation torch==2.10.0 torchvision==0.25.0
281+ # # nvsubquadratic runtime imports need only torch + einops + omegaconf; install
282+ # # the package itself without its core dependency tree (see job comment above).
283+ python -m pip install --no-build-isolation omegaconf
284+ python -m pip install --no-build-isolation --no-deps 'nvsubquadratic>=0.1.1'
285+ python -m pip install --no-build-isolation .[hyena,testing]
285286 python -m pip list
286287 shell : bash
287288 - name : Run Hyena tests (CUDA-required cases skip cleanly)
@@ -298,6 +299,7 @@ jobs:
298299 runs-on : ubuntu-latest
299300 env :
300301 QUICKTEST : True
302+ INDEX_URL : " https://download.pytorch.org/whl/cpu"
301303 steps :
302304 - name : Clean unused tools
303305 run : |
@@ -316,11 +318,10 @@ jobs:
316318 cache : ' pip'
317319 - name : Install dependencies
318320 run : |
319- python -m pip install --user --upgrade pip setuptools wheel twine packaging
321+ python -m pip install --user --upgrade pip setuptools wheel twine packaging tomli
320322 # install the latest pytorch for testing
321- # however, "pip install monai*.tar.gz" will build cpp/cuda with an isolated
322- # fresh torch installation according to pyproject.toml
323- python -m pip install torch==${PYTORCH_VER1} torchvision --extra-index-url https://download.pytorch.org/whl/cpu
323+ python monai/config/print_dependencies.py build-system all testing | \
324+ xargs -d '\n' pip install --no-build-isolation torch==${PYTORCH_VER1} --extra-index-url $INDEX_URL
324325 - name : Check packages
325326 run : |
326327 python -m pip uninstall -y monai
@@ -349,7 +350,7 @@ jobs:
349350 working-directory : ${{ steps.mktemp.outputs.tmp_dir }}
350351 run : |
351352 # install from wheel
352- python -m pip install monai*.whl --extra-index-url https://download.pytorch.org/whl/cpu
353+ python -m pip install --no-build-isolation monai*.whl --extra-index-url $INDEX_URL
353354 python -c 'import monai; monai.config.print_config()' 2>&1 | grep -iv "unknown"
354355 python -c 'import monai; print(monai.__file__)'
355356 python -m pip uninstall -y monai
@@ -359,6 +360,14 @@ jobs:
359360 run : |
360361 for name in *.tar.gz; do break; done
361362 echo $name
362- python -m pip install ${name}[all] --extra-index-url https://download.pytorch.org/whl/cpu
363+ python -m pip install --no-build-isolation ${name}[all] --extra-index-url $INDEX_URL
364+ python -c 'import monai; monai.config.print_config()' 2>&1 | grep -iv "unknown"
365+ python -c 'import monai; print(monai.__file__)'
366+ python -m pip uninstall -y monai
367+ - name : Install using uv
368+ working-directory : ${{ steps.root.outputs.pwd }}
369+ run : |
370+ pip install uv
371+ uv pip install --system --no-build-isolation .[all] --extra-index-url $INDEX_URL
363372 python -c 'import monai; monai.config.print_config()' 2>&1 | grep -iv "unknown"
364373 python -c 'import monai; print(monai.__file__)'
0 commit comments