Skip to content

Commit 6f275d1

Browse files
authored
Merge pull request #15 from ezyang/pr/uninstall-torch
Remove old build of torch before building.
2 parents abc95e1 + bda494e commit 6f275d1

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

jenkins/pytorch/build_nimbix.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,8 @@ export CMAKE_PREFIX_PATH=$CONDA_ROOT_PREFIX
183183
echo "Python Version:"
184184
python --version
185185

186-
# Uninstall onnx and onnx-caffe2; if stale versions are left over,
187-
# we may spuriously run test/test_onnx.py when we don't want to
188-
pip uninstall -y onnx || true
189-
pip uninstall -y onnx-caffe2 || true
186+
echo "Removing old builds of torch"
187+
pip uninstall -y torch || true
190188

191189
echo "Installing $PROJECT at branch $GIT_BRANCH and commit $GIT_COMMIT"
192190
rm -rf $PROJECT
@@ -205,6 +203,12 @@ pip install -r requirements.txt || true
205203
time python setup.py install
206204

207205
if [ ! -z "$jenkins_nightly" ]; then
206+
# Uninstall any leftover copies of onnx and onnx-caffe2
207+
echo "Removing any old builds"
208+
pip uninstall -y onnx || true
209+
pip uninstall -y onnx-caffe2 || true
210+
pip uninstall -y onnx-pytorch || true
211+
208212
echo "Installing nightly dependencies"
209213
conda install -y -c ezyang/label/gcc5 -c conda-forge protobuf scipy caffe2
210214
git clone https://github.com/onnx/onnx-caffe2.git --recurse-submodules --quiet

0 commit comments

Comments
 (0)