43
43
echo $CUDA_VISIBLE_DEVICES
44
44
python -c "import torch; print(torch.__version__); print('{} of GPUs available'.format(torch.cuda.device_count()))"
45
45
python -c 'import torch; print(torch.rand(5,3, device=torch.device("cuda:0")))'
46
- ./runtests.sh --coverage
46
+ BUILD_MONAI=1 ./runtests.sh --coverage
47
47
coverage xml
48
48
- name : Upload coverage
49
49
uses : codecov/codecov-action@v1
@@ -83,65 +83,15 @@ jobs:
83
83
run : |
84
84
python -m pip list
85
85
python -c 'import torch; print(torch.__version__); print(torch.rand(5,3))'
86
- ./runtests.sh --quick
86
+ BUILD_MONAI=1 ./runtests.sh --quick
87
87
coverage xml
88
88
- name : Upload coverage
89
89
uses : codecov/codecov-action@v1
90
90
with :
91
91
fail_ci_if_error : false
92
92
file : ./coverage.xml
93
93
94
- min-dep-py3 : # min dependencies installed
95
- runs-on : ${{ matrix.os }}
96
- strategy :
97
- fail-fast : false
98
- matrix :
99
- os : [windows-latest, macOS-latest, ubuntu-latest]
100
- timeout-minutes : 20
101
- steps :
102
- - uses : actions/checkout@v2
103
- - name : Set up Python 3.x
104
- uses : actions/setup-python@v1
105
- with :
106
- python-version : ' 3.x'
107
- - name : Prepare pip wheel
108
- run : |
109
- which python
110
- python -m pip install --upgrade pip wheel
111
- - name : cache weekly timestamp
112
- id : pip-cache
113
- run : |
114
- echo "::set-output name=datew::$(date '+%Y-%V')"
115
- echo "::set-output name=dir::$(pip cache dir)"
116
- shell : bash
117
- - name : cache for pip
118
- uses : actions/cache@v2
119
- id : cache
120
- with :
121
- path : ${{ steps.pip-cache.outputs.dir }}
122
- key : ${{ matrix.os }}-latest-pip-${{ steps.pip-cache.outputs.datew }}
123
- - if : runner.os == 'windows'
124
- name : Install torch cpu from pytorch.org (Windows only)
125
- run : |
126
- python -m pip install torch==1.4 -f https://download.pytorch.org/whl/cpu/torch_stable.html
127
- - name : Install the dependencies
128
- run : |
129
- # min. requirements for windows instances
130
- python -m pip install torch==1.4
131
- python -c "f=open('requirements-dev.txt', 'r'); txt=f.readlines(); f.close(); print(txt); f=open('requirements-dev.txt', 'w'); f.writelines(txt[1:5]); f.close()"
132
- cat "requirements-dev.txt"
133
- python -m pip install -r requirements-dev.txt
134
- python -m pip list
135
- SKIP_MONAI_BUILD=1 python setup.py develop # no compile of extensions
136
- shell : bash
137
- - name : Run quick tests (CPU ${{ runner.os }})
138
- run : |
139
- python -c 'import torch; print(torch.__version__); print(torch.rand(5,3))'
140
- python -m tests.min_tests
141
- env :
142
- QUICKTEST : True
143
-
144
- install :
94
+ install : # pip install from github url
145
95
runs-on : ubuntu-latest
146
96
steps :
147
97
- name : Set up Python 3.7
@@ -158,14 +108,19 @@ jobs:
158
108
with :
159
109
path : ~/.cache/pip
160
110
key : ${{ runner.os }}-pip-${{ steps.pip-cache.outputs.datew }}
161
- - name : Install the default branch
162
- run : |
163
- pip install git+https://github.com/Project-MONAI/MONAI#egg=MONAI
164
- - name : Import
111
+ - name : Install the default branch no build
165
112
run : |
113
+ BUILD_MONAI=0 pip install git+https://github.com/Project-MONAI/MONAI#egg=MONAI
166
114
python -c 'import monai; monai.config.print_config()'
167
- - name : Uninstall
115
+ cd $(python -c 'import monai; import os; print(os.path.dirname(monai.__file__))')
116
+ ls .
117
+ pip uninstall -y monai
118
+ - name : Install the default branch with build
168
119
run : |
120
+ BUILD_MONAI=1 pip install git+https://github.com/Project-MONAI/MONAI#egg=MONAI
121
+ python -c 'import monai; monai.config.print_config()'
122
+ cd $(python -c 'import monai; import os; print(os.path.dirname(monai.__file__))')
123
+ ls .
169
124
pip uninstall -y monai
170
125
171
126
docker :
0 commit comments