backscrub icon indicating copy to clipboard operation
backscrub copied to clipboard

Add convenience script for (re-)building

Open theCalcaholic opened this issue 2 years ago • 4 comments

I've created this script for myself, but figured, others might benefit as well.

Tested on Linux (Ubuntu 20.04, but that shouldn't matter)

theCalcaholic avatar Dec 07 '21 15:12 theCalcaholic

@BenBE Could you explain what is unclear about the usecase (as you added the "needs usecase" label)?

The idea is to make the setup of backscrub less error prone and more convenient, especially for less technical users.

theCalcaholic avatar Dec 08 '21 22:12 theCalcaholic

Howdy, thanks for this :smile: Given the intention is to make it easier for non-technical folks, would it be useful to ensure dependencies are installed as well as automating the instructions in the README? If so, perhaps using a CMake based mechanism similar to (if not exactly the same!) as Tensorflow uses would be effective?

Can I assume that backing up the build folder is to avoid lengthy downloads/rebuilds of Tensorflow? If so, it might be better to leverage the support for out-of-tree Tensorflow we have already in CMakeFiles.list?

Last thought - do we want to update the README.md so it mentions this helper script early on?

Please note: just questions for later, I'm happy this is merged as-is, then we can think about my random questions!

phlash avatar Dec 16 '21 09:12 phlash

@BenBE Could you explain what is unclear about the usecase (as you added the "needs usecase" label)?

I added the label for the other devs to have a look at this and chime in pro/con this change.

Given the comments from @phlash I think resolving the dependency re-download issue should be addressed; apart from that there's only minor stylistic things (missing escapes for the path argument in the trap call, e.g.) that I'd to in a later review.

BenBE avatar Dec 16 '21 11:12 BenBE

@phlash Thanks, these are very good points :)

Given the intention is to make it easier for non-technical folks, would it be useful to ensure dependencies are installed as well as automating the instructions in the README? If so, perhaps using a CMake based mechanism similar to (if not exactly the same!) as Tensorflow uses would be effective?

That's a good idea. I'm not quite sure how easy it would be to do this distro-agnostic, though (and my knowledge about CMake is quite limited), so we'd need to see how to implement this.

Can I assume that backing up the build folder is to avoid lengthy downloads/rebuilds of Tensorflow? If so, it might be better to leverage the support for out-of-tree Tensorflow we have already in CMakeFiles.list?

No, I added that just to avoid breaking the setup. Everything is rebuilt anyways. However, if you use the script for updating backscrub and something breaks (e.g. a dependency is missing or an environment variable is set wrongly), users will still have their working pre-update version.

theCalcaholic avatar Dec 16 '21 23:12 theCalcaholic