diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d96d319 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,37 @@ +FROM pytorch/pytorch:2.2.1-cuda11.8-cudnn8-runtime + +LABEL authors="Colby T. Ford " + +## Install system requirements +RUN apt update && \ + apt-get install -y --reinstall \ + ca-certificates && \ + apt install -y \ + git \ + wget \ + libxml2 \ + libgl-dev \ + libgl1 \ + gcc \ + g++ + +## Set working directory +RUN mkdir -p /software/flowdock +WORKDIR /software/flowdock + +## Clone project +RUN git clone https://github.com/BioinfoMachineLearning/FlowDock /software/flowdock + +## Create conda environment +# RUN conda env create -f environments/flowdock_environment.yaml +COPY environments/flowdock_environment_docker.yaml /software/flowdock/environments/flowdock_environment_docker.yaml +RUN conda env create -f environments/flowdock_environment_docker.yaml + +## Automatically activate conda environment +RUN echo "source activate flowdock" >> /etc/profile.d/conda.sh && \ + echo "source /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \ + echo "conda activate flowdock" >> ~/.bashrc + +## Default shell and command +SHELL ["/bin/bash", "-l", "-c"] +CMD ["/bin/bash"] \ No newline at end of file diff --git a/README.md b/README.md index b600638..b85a9ed 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ This is the official codebase of the paper - [How to create comparative plots of evaluation results](#how-to-create-comparative-plots-of-evaluation-results) - [How to predict new protein-ligand complex structures and their affinities using FlowDock](#how-to-predict-new-protein-ligand-complex-structures-using-flowdock) - [For developers](#for-developers) +- [Docker](#docker) - [Acknowledgements](#acknowledgements) - [License](#license) - [Citing this work](#citing-this-work) @@ -384,6 +385,33 @@ rm env.yaml # clean up temporary environment file +## Docker + +
+ +Given that this tool has a number of dependencies, it may be easier to run it in a Docker container. + +Pull from [Docker Hub](https://hub.docker.com/repository/docker/cford38/flowdock): `docker pull cford38/flowdock:latest` + + + +Alternatively, build the Docker image locally: + +```bash +docker build --platform linux/amd64 -t flowdock . +``` + +Then, run the Docker container (and mount your local `checkpoints/` directory) + +```bash +docker run --gpus all -v ./checkpoints:/software/flowdock/checkpoints --rm --name flowdock -it flowdock /bin/bash + +# docker run --gpus all -v ./checkpoints:/software/flowdock/checkpoints --rm --name flowdock -it cford38/flowdock:latest /bin/bash +``` + +
+ + ## Acknowledgements `FlowDock` builds upon the source code and data from the following projects: diff --git a/environments/flowdock_environment_docker.yaml b/environments/flowdock_environment_docker.yaml new file mode 100644 index 0000000..14b9d4f --- /dev/null +++ b/environments/flowdock_environment_docker.yaml @@ -0,0 +1,50 @@ +name: flowdock +channels: + - pyg + - iopath + - pytorch + - nvidia + - defaults + - conda-forge +dependencies: + - hydra-core=1.3.2=pyhd8ed1ab_0 + - mendeleev=0.15.0=pyhc1e730c_0 + - msgpack-python=1.0.3=py39hd09550d_0 + - networkx=3.1=py39h06a4308_0 + - omegaconf=2.3.0=pyhd8ed1ab_0 + - pandas=2.1.4=py39h1128e8f_0 + - python=3.9.17=h0755675_0_cpython + - pytorch=2.2.1=py3.9_cuda11.8_cudnn8.7.0_0 + - pytorch-cuda=11.8=h7e8668a_5 + - pytorch-mutex=1.0=cuda + - pytorch-scatter=2.1.2=py39_torch_2.2.0_cu118 + - rdkit=2024.03.1=py39h6cc1c65_0 + - rich=13.3.5=py39h06a4308_0 + - scikit-learn=1.4.1.post1=py39ha22ef79_0 + - scipy=1.12.0=py39h474f0d3_2 + - torchaudio=2.2.1=py39_cu118 + - torchtriton=2.2.0=py39 + - torchvision=0.17.1=py39_cu118 + - tqdm=4.66.1=pyhd8ed1ab_0 + - pip: + - beartype==0.17.2 + - biopandas==0.4.1 + - biopython>=1.79 + - dm-tree==0.1.8 + - einops==0.7.0 + - fair-esm==2.0.0 + - hydra-colorlog==1.2.0 + - lightning==2.2.2 + - lightning-utilities==0.11.1 + - lovely-numpy==0.2.11 + - lovely-tensors==0.1.15 + - ml-collections==0.1.1 + - msgpack-numpy==0.4.8 + - numpy==1.23.5 + - git+https://github.com/amorehead/openfold.git@fe1275099639bf7e617e09ef24d6af778647dd64 + - prody==2.4.1 + - pytorch-lightning==2.2.2 + - git+https://github.com/facebookresearch/pytorch3d.git@3da7703c5ac10039645966deddffe8db52eab8c5 + - rootutils==1.0.7 + - torchmetrics==1.3.1 + - wandb==0.17.0