|
155 | 155 | fi
|
156 | 156 | source activate py2k
|
157 | 157 | export CONDA_ROOT_PREFIX="$HOME/miniconda/envs/py2k"
|
| 158 | +else |
| 159 | + source activate root |
158 | 160 | fi
|
159 | 161 |
|
160 | 162 | echo "Conda root: $CONDA_ROOT_PREFIX"
|
|
194 | 196 | pip install -r requirements.txt || true
|
195 | 197 | time python setup.py install
|
196 | 198 |
|
| 199 | +if [ ! -z "$jenkins_nightly" ]; then |
| 200 | + echo "Installing nightly dependencies" |
| 201 | + conda install -y -c ezyang/label/gcc5 -c conda-forge protobuf scipy caffe2 |
| 202 | + git clone https://github.com/onnx/onnx-caffe2.git --recurse-submodules --quiet |
| 203 | + # There is some nuance to the strategy here. In principle, |
| 204 | + # we could check out HEAD versions of *all* our dependencies |
| 205 | + # and see if the whole shebang builds. But if the build breaks, |
| 206 | + # it is not obvious who is to blame. A breakage here is |
| 207 | + # not *actionable*, which means it is not useful. |
| 208 | + # |
| 209 | + # So, our strategy is to checkout HEAD of onnx-pytorch (which |
| 210 | + # is supposed to be passing CI), and update only *pytorch* |
| 211 | + # to HEAD. |
| 212 | + # |
| 213 | + # BTW, this means that this is likely to fail of onnx-pytorch |
| 214 | + # is floating some temporary patches that haven't made their |
| 215 | + # way back to PyTorch. This is by design: merge those patches! |
| 216 | + echo "Installing onnx-pytorch" |
| 217 | + git clone https://github.com/ezyang/onnx-pytorch.git --recurse-submodules --quiet |
| 218 | + (cd onnx-pytorch/onnx && python setup.py install) |
| 219 | + (cd onnx-pytorch/onnx-caffe2 && python setup.py install) |
| 220 | + python onnx-pytorch/test/test_models.py |
| 221 | + python onnx-pytorch/test/test_caffe2.py |
| 222 | +fi |
| 223 | + |
197 | 224 | echo "Testing pytorch"
|
198 | 225 | export OMP_NUM_THREADS=4
|
199 | 226 | export MKL_NUM_THREADS=4
|
|
0 commit comments