Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add convenience script for (re-)building #127

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

theCalcaholic
Copy link

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)

build.sh Outdated Show resolved Hide resolved
build.sh Outdated Show resolved Hide resolved
build.sh Outdated Show resolved Hide resolved
build.sh Outdated Show resolved Hide resolved
build.sh Outdated Show resolved Hide resolved
build.sh Outdated Show resolved Hide resolved
build.sh Outdated Show resolved Hide resolved
build.sh Outdated Show resolved Hide resolved
@BenBE BenBE added the needs use case something that needs a use case to warrant working on it label Dec 7, 2021
Copy link
Author

@theCalcaholic theCalcaholic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have attempted to address all issues you mentioned now :)

build.sh Outdated Show resolved Hide resolved
build.sh Outdated Show resolved Hide resolved
build.sh Outdated Show resolved Hide resolved
build.sh Outdated Show resolved Hide resolved
build.sh Outdated Show resolved Hide resolved
build.sh Outdated Show resolved Hide resolved
@theCalcaholic
Copy link
Author

@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.

Copy link
Author

@theCalcaholic theCalcaholic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the subshell

@phlash
Copy link
Collaborator

phlash commented Dec 16, 2021

Howdy, thanks for this 😄 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!

@BenBE BenBE added enhancement New feature or request and removed needs use case something that needs a use case to warrant working on it labels Dec 16, 2021
@BenBE
Copy link
Collaborator

BenBE commented Dec 16, 2021

@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.

@theCalcaholic
Copy link
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants