Skip to content

Commit

Permalink
Merge pull request #4 from colbyford/main
Browse files Browse the repository at this point in the history
Add Docker Image
  • Loading branch information
amorehead authored Jan 24, 2025
2 parents 86c593f + 5cfb1b8 commit a66a9fd
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 0 deletions.
37 changes: 37 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM pytorch/pytorch:2.2.1-cuda11.8-cudnn8-runtime

LABEL authors="Colby T. Ford <colby@tuple.xyz>"

## 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"]
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -384,6 +385,33 @@ rm env.yaml # clean up temporary environment file

</details>

## Docker

<details>

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
```

</details>


## Acknowledgements

`FlowDock` builds upon the source code and data from the following projects:
Expand Down
50 changes: 50 additions & 0 deletions environments/flowdock_environment_docker.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit a66a9fd

Please sign in to comment.