Retry dependency installation if it does fail

Change-Id: I8989028a882ed631eafea58f7360ddb2d55b0248