This documentation is in Beta mode! Please give feedback by suggesting/commenting in embedded documents or via the Feedback Form!
An image for RFdiffusion supported by RosettaCommons is available on DockerHub.
To obtain the image run
docker pull rosettacommons/rfdiffusion
from the command line. You will need to have Docker installed in order to pull and use the image. Learn how to do this here.
docker run -it --rm \
-v /path/to/your/input_dir:/input \
-v /path/to/your/output_dir:/output \
rosettacommons/rfdiffusion \
inference.output_prefix=/output/motifscaffolding \
inference.model_directory_path=/app/RFdiffusion/models \
inference.input_pdb=/input/5TPN.pdb \
inference.num_designs=3 \
contigmap.contigs='[10-40/A163-181/10-40]'
In the RFdiffusion repository, there is a directory of example scripts that can be run without modification to generate different types of backbone structures. To run these using the Docker image follow use this command:
docker run -t --rm --entrypoint bash \
-v /path/to/your/output_dir:/output \
-v /app/RFdiffusion/examples \
rosettacommons/rfdiffusion\
app/RFdiffusion/examples/example_script.sh
Make sure to change the example_script.sh to the example you want to run.
Create a .sif file (the type of image file that Apptainer uses) from the Docker image:
apptainer pull rfd.sif docker://rosettacommons/rfdiffusion
Note: This can take several minutes.
apptainer run --nv rfd.sif \
inference.output_prefix=path/to/your/output_dir/motifscaffolding \
inference.model_directory_path=/app/RFdiffusion/models \
inference.schedule_directory_path=schedules
inference.input_pdb=path/to/your/input_dir/5TPN.pdb \
inference.num_designs=3 \
contigmap.contigs='[10-40/A163-181/10-40]'
In the RFdiffusion repository, there is a directory of example scripts that can be run without modification to generate different types of backbone structures. To run these using the Docker image follow use this command:
apptainer exec --nv --pwd /app/RFdiffusion/examples \
-B /path/to/output_dir/:/app/RFdiffusion/examples/outputs \
-B /path/to/schedule_dir/:/app/RFdiffusion/schedules \
rfd.sif \
sh /app/RFdiffusion/examples/example_script.sh
Make sure to change the example_script.sh to the example you want to run.
A Docker file hase been provided at docker/Dockerfile to help run RFdiffusion on HPC and other container orchestration systems. To build and run the container on your system:
Clone the RFdiffusion repository: git clone https://github.com/RosettaCommons/RFdiffusion.git and switch to the directory via cd RFdiffusion
Verify that the Docker daemon is running on your system with docker info. You can find Docker installation instructions for Mac, WIndows, and Linux in the official Docker docs. You may also consider Finch, the open source client for container development, however the instructions here assume use of Docker.
Build the container image on your system with docker build -f docker/Dockerfile -t rfdiffusion.
Create some folders on your file system with mkdir $HOME/inputs $HOME/outputs $HOME/models, these will store the inputs and outputs of your calculations and the model files that will be downloaded in the next step.
Download the RFDiffusion models with bash scripts/download_models.sh $HOME/models.
Download a test file (or another of your choice) with wget -P $HOME/inputs https://files.rcsb.org/view/5TPN.pdb
Test the container by running the following command:
docker run -it --rm --gpus all \
-v $HOME/models:$HOME/models \
-v $HOME/inputs:$HOME/inputs \
-v $HOME/outputs:$HOME/outputs \
rfdiffusion \
inference.output_prefix=$HOME/outputs/motifscaffolding \
inference.model_directory_path=$HOME/models \
inference.input_pdb=$HOME/inputs/5TPN.pdb \
inference.num_designs=3 \
'contigmap.contigs=[10-40/A163-181/10-40]'
Following these instructions starts the rfdiffusion container, mounts the models, inputs, and outputs folders, passes all available GPUs, and then calls the run_inference.py script with the parameters specified.