6666 # Test Python versions under Ubuntu with lowest PyTorch version supported
6767 - os : ubuntu-latest
6868 pytorch-version : ' 2.5.1'
69- python-version : ' 3.10'
70- - os : ubuntu-latest
71- pytorch-version : ' 2.5.1'
72- python-version : ' 3.11'
73- - os : ubuntu-latest
74- pytorch-version : ' 2.5.1'
75- python-version : ' 3.12'
69+ python-version : ['3.10', '3.11', '3.12']
7670
7771 # Test PyTorch versions under Ubuntu with lowest Python version supported
7872 - os : ubuntu-latest
@@ -108,16 +102,21 @@ jobs:
108102 with :
109103 path : ${{ steps.pip-cache.outputs.dir }}
110104 key : ${{ matrix.os }}-latest-pip-${{ steps.pip-cache.outputs.datew }}
111- - name : Install the dependencies with PyTorch ${{ matrix.pytorch-version }}
105+ - name : Install the minimum dependencies
112106 run : |
113- /usr/bin/env nvidia-smi 2> /dev/null || echo "No nvidia-smi found"
114107 # min. requirements
115108 python -m pip install torch==${{ matrix.pytorch-version }}
116109 python -m pip install -r requirements-min.txt
117110 python -m pip list
118111 BUILD_MONAI=0 python setup.py develop # no compile of extensions
119112 shell : bash
120- - name : Run quick tests (CPU ${{ runner.os }})
113+ - if : matrix.os == 'linux-gpu-runner'
114+ name : Print GPU Info
115+ run : |
116+ nvidia-smi
117+ python -c 'import torch; print(torch.rand(2,2).to("cuda:0"))'
118+ shell : bash
119+ - name : Run quick tests
121120 run : |
122121 python -c 'import torch; print(torch.__version__); print(torch.rand(5,3))'
123122 python -c "import monai; monai.config.print_config()"
@@ -174,7 +173,7 @@ jobs:
174173 run : |
175174 python -m pip install --pre -U itk
176175 find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \;
177- - name : Install the dependencies
176+ - name : Install the complete dependencies
178177 run : |
179178 python -m pip install --user --upgrade pip wheel
180179 python -m pip install torch==2.5.1 torchvision==0.20.1
@@ -188,7 +187,7 @@ jobs:
188187 python setup.py develop --uninstall
189188 BUILD_MONAI=1 python setup.py develop # compile the cpp extensions
190189 shell : bash
191- - name : Run quick tests (CPU ${{ runner.os }})
190+ - name : Run quick tests
192191 run : |
193192 python -c 'import torch; print(torch.__version__); print(torch.rand(5,3))'
194193 python -c "import monai; monai.config.print_config()"
0 commit comments