-
Notifications
You must be signed in to change notification settings - Fork 59
fix(docker, predictor): copy libtorch to iota-tools docker image
#9450
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
base: protocol-research/ogd-predictor-experiments
Are you sure you want to change the base?
fix(docker, predictor): copy libtorch to iota-tools docker image
#9450
Conversation
Signed-off-by: Roman Overko <roman.overko@iota.org>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 6 Skipped Deployments
|
libtorch to iota-tools docker imagelibtorch to iota-tools docker image
bingyanglin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except for the minor formatting issue, LGTM.
Signed-off-by: Roman Overko <roman.overko@iota.org>
Signed-off-by: Roman Overko <roman.overko@iota.org>
Signed-off-by: Roman Overko <roman.overko@iota.org>
Signed-off-by: Roman Overko <roman.overko@iota.org>
2cef271 to
a1dc026
Compare
| # Copy LibTorch runtime so iota-node can load predictor components | ||
| COPY --from=builder /iota/target/${PROFILE}/build/torch-sys-*/out/libtorch/libtorch/lib/ /opt/libtorch/lib/ | ||
| # Set an explicit LD_LIBRARY_PATH without referencing an undefined variable to satisfy linters | ||
| ENV LD_LIBRARY_PATH=/opt/libtorch/lib | ||
| RUN echo "/opt/libtorch/lib" > /etc/ld.so.conf.d/libtorch.conf && ldconfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't a apt install -y libtorch1.13 enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add libtorch1.13 to the # Install runtime dependencies and tools line above, and try without this change here, if it works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @muXxer, I will try that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have agreed to leave it as it is, since it will not be merged into develop and the following did not work:
-
apt install libtorch2.6gives build error:1.881 E: Unable to locate package libtorch2.6 1.881 E: Couldn't find any package by glob 'libtorch2.6' -
apt install libtorch1.13gives run error:/usr/local/bin/iota: error while loading shared libraries: libtorch_cpu.so: cannot open shared object file: No such file or directory -
apt install libtorch-devgives run error:/usr/local/bin/iota: symbol lookup error: /usr/local/bin/iota: undefined symbol: _ZNK3c107SymBool10guard_boolEPKcl
Signed-off-by: Roman Overko <roman.overko@iota.org>
Note
This change is only needed for gas price prediction experiments, and the base branch of this PR is not planned to be merged to
develop.Description of change
This PR copies
libtorch(required by the gas price predictor) to theiota-toolsdocker image, in the same way how it is done for theiota-nodeimage.The
iota-toolsimage builds theiota-nodecomponent, which is then used indev-tools/iota-private-network/bootstrap.shto generate genesis. Running thedev-tools/iota-private-network/bootstrap.shscript results inif the
libtorchlibrary is not copied to theiota-toolsdocker image.EDIT:
How the change has been tested
Run these commands from the monorepo root folder:
Build the
iota-toolsimage:Bootstrap
iota-private-network: