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

how to compile a torch/tensorflow version of Rosetta #304

Open
ning-2022 opened this issue Jan 21, 2025 · 3 comments
Open

how to compile a torch/tensorflow version of Rosetta #304

ning-2022 opened this issue Jan 21, 2025 · 3 comments

Comments

@ning-2022
Copy link

Hi Guys,

Very happy to get these wonderful protein design tools.  Thanks so much for your efforts. Recently, I need to install the torch/tensorflow version for Rosetta.  I run this commands: ./scons.py  -j 14 bin mode=release extras=pytorch,tensorflow

But it complained this error as following:

g++ -o build/src/release/linux/5.15/64/x86/gcc/7/pytorch/protocols/inverse_folding/MIFST.os -c -ffor-scope -isystem external/boost_submod/ -isystem external/ -isystem external/include/ -isystem external/dbio/ -isystem external/libxml2/include -isystem external/rdkit -std=c++1y -pipe -Wall -Wextra -pedantic -Wno-long-long -Wno-strict-aliasing -march=core2 -mtune=generic -O3 -ffast-math -fno-finite-math-only -funroll-loops -finline-functions -finline-limit=20000 -s -Wno-unused-variable -Wno-unused-parameter -fPIC -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS -DBOOST_DISABLE_THREADS -DPTR_STD -DNDEBUG -DUSE_PYTORCH -DCXX14 -DCXX14_OR_LATER -Isrc -Iexternal/include -Isrc/platform/linux/64/gcc/7 -Isrc/platform/linux/64/gcc -Isrc/platform/linux/64 -Isrc/platform/linux -Iexternal/libtorch/include src/protocols/inverse_folding/MIFST.cc
In file included from src/protocols/inverse_folding/MIFST.cc:17:0:
src/protocols/inverse_folding/MIFST.hh:41:10: fatal error: torch/script.h: No such file or directory
#include <torch/script.h>
^~~~~~~~~~~~~~~~
compilation terminated.
scons: *** [build/src/release/linux/5.15/64/x86/gcc/7/pytorch/protocols/inverse_folding/MIFST.os] Error 1
scons: building terminated because of errors.

Please help me to fix this bug. I also tried to find the installation guide on the documentation page (https://www.rosettacommons.org/docs/latest/build_documentation/Building-Rosetta-with-TensorFlow-and-PyTorch), but it told me that I don't have right to access. If you have any suggestions for this, please help me. I really appreciates.

Best regards,
Ning

@ning-2022
Copy link
Author

Sorry to forget to give the version of Rosetta I used. It's 3.14 version.

Ning

@roccomoretti
Copy link
Member

The URL for the documentation is https://docs.rosettacommons.org/docs/latest/build_documentation/Building-Rosetta-with-TensorFlow-and-Torch

Relevant, the reason for the move is that we changed "pytorch" to simply "torch" with respect to Rosetta. (As we just use the underlying C++ library libtorch, and don't use the python wrappers.) For recent versions of Rosetta you'd use extras=torch,tensorflow to compile, but with Rosetta 3.14, you'd still use extras=pytorch,tensorflow (adjust the documentation as appropriate.)

@ning-2022
Copy link
Author

Thanks so much for your help. Great, it works!
I always learn a lot from your comments when beginning to study Rosetta.

Ning

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

No branches or pull requests

2 participants