RFdiffusion icon indicating copy to clipboard operation
RFdiffusion copied to clipboard

RFDiffusion for Singularity

Open almeida85 opened this issue 2 years ago • 3 comments

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

almeida85 avatar Nov 15 '23 11:11 almeida85

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:

  • defaults
  • pytorch
  • dglteam
  • nvidia
  • conda-forge dependencies:
  • python=3.10.4
  • pytorch::pytorch=1.12.0
  • torchaudio
  • pytorch::torchvision=0.13.0
  • cudatoolkit=11.7
  • dgl-cuda11.7
  • icecream
  • pip
  • pip:
    • hydra-core
    • pyrsistent

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

kjendseth avatar Nov 24 '23 09:11 kjendseth

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

almeida85 avatar Nov 24 '23 09:11 almeida85

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

jennifermbui avatar Aug 21 '24 00:08 jennifermbui