RosettaCommons / RFdiffusion

Code for running RFdiffusion
Other
1.66k stars 320 forks source link

RFDiffusion for Singularity #155

Open almeida85 opened 10 months ago

almeida85 commented 10 months ago

Hello,

I am trying to run RFDiffusion in my HPC with Singularity (I don't have Docker).

I generated the SIF image with singularity build rfdiffusion.sif docker://stephenturner/rfdiffusion.

Could you provide instructions or an example script to run a rfdiffusion.sif container? I tried to do it as in other of my scripts unsuccessfully.

Thanks in advance

kjendseth commented 10 months ago

Hi,

I did install RFdiffusion on such a system and after a lot of trial and error I ended up with this protocol. Perhaps you can get some inspiration here. There are few tricks included.

How to install Rfdiffusion on HPC:

Go to directory where the program should be installed (e.g. /cluster/..../prog )

git clone https://github.com/RosettaCommons/RFdiffusion.git

cd RFdiffusion mkdir models && cd models wget http://files.ipd.uw.edu/pub/RFdiffusion/6f5902ac237024bdd0c176cb93063dc4/Base_ckpt.pt wget http://files.ipd.uw.edu/pub/RFdiffusion/e29311f6f1bf1af907f9ef9f44b8328b/Complex_base_ckpt.pt wget http://files.ipd.uw.edu/pub/RFdiffusion/60f09a193fb5e5ccdc4980417708dbab/Complex_Fold_base_ckpt.pt wget http://files.ipd.uw.edu/pub/RFdiffusion/74f51cfb8b440f50d70878e05361d8f0/InpaintSeq_ckpt.pt wget http://files.ipd.uw.edu/pub/RFdiffusion/76d00716416567174cdb7ca96e208296/InpaintSeq_Fold_ckpt.pt wget http://files.ipd.uw.edu/pub/RFdiffusion/5532d2e1f3a4738decd58b19d633b3c3/ActiveSite_ckpt.pt wget http://files.ipd.uw.edu/pub/RFdiffusion/12fc204edeae5b57713c5ad7dcb97d39/Base_epoch8_ckpt.pt

wget http://files.ipd.uw.edu/pub/RFdiffusion/f572d396fae9206628714fb2ce00f72e/Complex_beta_ckpt.pt wget http://files.ipd.uw.edu/pub/RFdiffusion/1befcb9b28e2f778f53d47f18b7597fa/RF_structure_prediction_weights.pt

Change env/SE3nv.yml to:

name: SE3nv channels:

conda env create --prefix /cluster/..../prog/RFdiffusion/env/rf_env -f env/SE3nv.yml

conda activate SE3nv cd env/SE3Transformer pip install --no-cache-dir -r requirements.txt python setup.py install cd ../.. # change into the root directory of the repository pip install -e . # install the rfdiffusion module from the root of the repository

Then:

pip3 install --force-reinstall torch torchvision torchaudio

Anytime you run diffusion you should be sure to activate this conda environment by running the following command:

conda activate /cluster/projects/.../prog/RFdiffusion/env/rf_env

almeida85 commented 10 months ago

Hi @kjendseth,

Thanks! I will give it a try. Anyway, I think it should be possible to run it with Singularity. I generated the .sif image from the Docker container, but I am still struggling to make it run.

-Best

jennifermbui commented 1 month ago

Thanks for posting these tricks, @kjendseth. They really work!