From bda494e241db8d51b44a98b21f42e8a8291f4eff Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Fri, 20 Oct 2017 11:37:48 -0400 Subject: [PATCH] Remove old build of torch before building. Signed-off-by: Edward Z. Yang --- jenkins/pytorch/build_nimbix.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/jenkins/pytorch/build_nimbix.sh b/jenkins/pytorch/build_nimbix.sh index e9bfce9bb..dc3c7c277 100644 --- a/jenkins/pytorch/build_nimbix.sh +++ b/jenkins/pytorch/build_nimbix.sh @@ -183,10 +183,8 @@ export CMAKE_PREFIX_PATH=$CONDA_ROOT_PREFIX echo "Python Version:" python --version -# Uninstall onnx and onnx-caffe2; if stale versions are left over, -# we may spuriously run test/test_onnx.py when we don't want to -pip uninstall -y onnx || true -pip uninstall -y onnx-caffe2 || true +echo "Removing old builds of torch" +pip uninstall -y torch || true echo "Installing $PROJECT at branch $GIT_BRANCH and commit $GIT_COMMIT" rm -rf $PROJECT @@ -205,6 +203,12 @@ pip install -r requirements.txt || true time python setup.py install if [ ! -z "$jenkins_nightly" ]; then + # Uninstall any leftover copies of onnx and onnx-caffe2 + echo "Removing any old builds" + pip uninstall -y onnx || true + pip uninstall -y onnx-caffe2 || true + pip uninstall -y onnx-pytorch || true + echo "Installing nightly dependencies" conda install -y -c ezyang/label/gcc5 -c conda-forge protobuf scipy caffe2 git clone https://github.com/onnx/onnx-caffe2.git --recurse-submodules --quiet