Skip to content

Commit f281fdf

Browse files
authored
Merge pull request #11 from colbyford/main
Update Dockerfile to run the bio-diffusion model(s)
2 parents 51021a5 + 314f758 commit f281fdf

File tree

3 files changed

+52
-15
lines changed

3 files changed

+52
-15
lines changed

Dockerfile

+32-9
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,41 @@
1-
FROM nvcr.io/nvidia/pytorch:21.06-py3
1+
# FROM nvcr.io/nvidia/pytorch:21.06-py3
2+
FROM pytorch/pytorch:1.12.1-cuda11.3-cudnn8-runtime
23

3-
####################################################################
4+
LABEL authors="Colby T. Ford <[email protected]>"
45

5-
# install system requirements
6-
RUN apt update && apt install -y vim libgl-dev libgl1
7-
RUN apt-get install -y --reinstall ca-certificates # note: for git
8-
RUN apt install -y git
6+
## Install system requirements
7+
RUN apt update && \
8+
apt-get install -y --reinstall \
9+
ca-certificates && \
10+
apt install -y \
11+
git \
12+
vim \
13+
wget \
14+
libxml2 \
15+
libgl-dev \
16+
libgl1
917

10-
# set environment variables
18+
## Set environment variables
1119
ENV MPLCONFIGDIR /data/MPL_Config
1220
ENV TORCH_HOME /data/Torch_Home
1321
ENV TORCH_EXTENSIONS_DIR /data/Torch_Extensions
22+
ENV DEBIAN_FRONTEND noninteractive
1423

15-
####################################################################
24+
## Make directories
25+
RUN mkdir -p /software/
26+
WORKDIR /software/
27+
28+
## Install dependencies from Conda/Mamba
29+
COPY environment.yaml /software/environment.yaml
30+
RUN conda env create -f environment.yaml
31+
RUN conda init bash && \
32+
echo "conda activate bio-diffusion" >> ~/.bashrc
33+
SHELL ["/bin/bash", "--login", "-c"]
34+
35+
## Install bio-diffusion
36+
RUN git clone https://github.com/BioinfoMachineLearning/bio-diffusion && \
37+
cd bio-diffusion && \
38+
pip install -e .
39+
WORKDIR /software/bio-diffusion/
1640

17-
# set the entrypoint
1841
CMD /bin/bash

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,20 @@ python3 src/mol_gen_eval_optimization_qm9.py datamodule=edm_qm9 model=qm9_mol_ge
298298

299299
Please refer to the following dedicated GitHub repository for further details: https://github.com/BioinfoMachineLearning/GCDM-SBDD.
300300

301+
## Docker
302+
303+
To run this project in a Docker container, you can use the following commands:
304+
305+
```bash
306+
## Build the image
307+
docker build -t bio-diffusion .
308+
309+
## Run the container (with GPUs and mounting the current directory)
310+
docker run -it --gpus all -v .:/mnt --name bio-diffusion bio-diffusion
311+
```
312+
__Note:__ You will still need to download the checkpoints and data as described in the installation guide. Then, update the Python commands to point to the desired local location of your files (e.g., `/mnt/checkpoints` and `/mnt/outputs`) once in the container.
313+
314+
301315
## Acknowledgements
302316

303317
Bio-Diffusion builds upon the source code and data from the following projects:

environment.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ dependencies:
7070
- glm=0.9.9.4=h924138e_2
7171
- gmp=6.2.1=h58526e2_0
7272
- gnutls=3.6.13=h85f3911_1
73-
- graphite2=1.3.13=h58526e2_1001
73+
# - graphite2=1.3.13=h58526e2_1001
7474
- gst-plugins-base=1.21.3=h4243ec0_1
7575
- gstreamer=1.21.3=h25f0c4b_1
7676
- gstreamer-orc=0.4.33=h166bdaf_0
@@ -274,10 +274,10 @@ dependencies:
274274
- xorg-renderproto=0.11.1=h7f98852_1002
275275
- xorg-xextproto=7.3.0=h7f98852_1002
276276
- xorg-xproto=7.0.31=h7f98852_1007
277-
- xtb=6.5.1=h97a9613_0
277+
# - xtb=6.5.1=h97a9613_0
278278
- xz=5.2.6=h5eee18b_0
279-
- yaml=0.2.5=h7f98852_2
280-
- yaml-cpp=0.7.0=h27087fc_2
279+
# - yaml=0.2.5=h7f98852_2
280+
# - yaml-cpp=0.7.0=h27087fc_2
281281
- zlib=1.2.13=h166bdaf_4
282282
- zstandard=0.19.0=py39h29414ee_1
283283
- zstd=1.5.2=h8a70e8d_1
@@ -337,7 +337,7 @@ dependencies:
337337
- identify==2.5.6
338338
- imageio==2.22.2
339339
- importlib-metadata==5.0.0
340-
- iniconfig==1.1.1
340+
# - iniconfig==1.1.1
341341
- ipython==8.8.0
342342
- jedi==0.18.2
343343
- jupyter-client==7.4.8
@@ -434,4 +434,4 @@ dependencies:
434434
- werkzeug==2.2.2
435435
- wrapt==1.14.1
436436
- yarl==1.8.1
437-
- zipp==3.9.0
437+
- zipp==3.9.0

0 commit comments

Comments
 (0)