Skip to content

Commit 8c36c48

Browse files
authored
Merge pull request #182 from gcorso/dev_v1.1
Version 1.1
2 parents bc6b515 + d9114a4 commit 8c36c48

File tree

97 files changed

+237569
-4717
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+237569
-4717
lines changed

.dockerignore

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Ignore hidden files and folders
2+
**/.*
3+
.DS_store
4+
5+
# Ignore git directories (redundant)
6+
.git
7+
.gitattributes
8+
9+
# Ignore generated user results
10+
results/*
11+
tmp/
12+
13+
# Ignore trained models
14+
workdir/*
15+
16+
# Do not include PDBBind files
17+
# (quite likely they are in the same directory)
18+
**/pdbbind_sequences.fasta
19+
**/PDBBind_processed/
20+
21+
# Byte-compiled / optimized / DLL files
22+
__pycache__/
23+
*.py[cod]
24+
*$py.class
25+
26+
# Distribution / packaging
27+
.Python
28+
build/
29+
develop-eggs/
30+
dist/
31+
downloads/
32+
eggs/
33+
.eggs/
34+
lib/
35+
lib64/
36+
parts/
37+
sdist/
38+
var/
39+
wheels/
40+
*.egg-info/
41+
.installed.cfg
42+
*.egg
43+
MANIFEST
44+
45+
# PyInstaller
46+
# Usually these files are written by a python script from a template
47+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
48+
*.manifest
49+
*.spec
50+
51+
# Installer logs
52+
pip-log.txt
53+
pip-delete-this-directory.txt
54+
55+
# Unit test / coverage reports
56+
htmlcov/
57+
.tox/
58+
.coverage
59+
.coverage.*
60+
.cache
61+
nosetests.xml
62+
coverage.xml
63+
*.cover
64+
.hypothesis/
65+
.pytest_cache/
66+
67+
# Translations
68+
*.mo
69+
*.pot
70+
71+
# Django stuff:
72+
*.log
73+
local_settings.py
74+
db.sqlite3
75+
76+
# Flask stuff:
77+
instance/
78+
.webassets-cache
79+
80+
# Scrapy stuff:
81+
.scrapy
82+
83+
# Sphinx documentation
84+
docs/_build/
85+
86+
# PyBuilder
87+
target/
88+
89+
# Jupyter Notebook
90+
.ipynb_checkpoints
91+
92+
# pyenv
93+
.python-version
94+
95+
# celery beat schedule file
96+
celerybeat-schedule
97+
98+
# SageMath parsed files
99+
*.sage.py
100+
101+
# Environments
102+
.env
103+
.venv
104+
env/
105+
venv/
106+
ENV/
107+
env.bak/
108+
venv.bak/
109+
110+
# Spyder project settings
111+
.spyderproject
112+
.spyproject
113+
114+
# Rope project settings
115+
.ropeproject
116+
117+
# mkdocs documentation
118+
/site
119+
120+
# mypy
121+
.mypy_cache/
122+
local_config_inference2.yml
123+
.vscode/
124+
125+
126+
*.zip
127+
128+
.idea/

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ inference_out_dir_not_specified
55
renew.sh
66
tmux_renew.sh
77
images
8+
tmp/
9+
810
# Byte-compiled / optimized / DLL files
911
__pycache__/
1012
*.py[cod]
@@ -130,7 +132,7 @@ local_config_inference2.yml
130132
!/data/testset_csv.csv
131133
!/data/INDEX_general_PL_data.2020
132134
test_run
133-
135+
artifacts
134136
cache
135137
wandb
136138
logs
@@ -154,7 +156,7 @@ results
154156
!/runs/flexible_self_docking
155157
local_config.yml
156158
local_config_inference.yml
157-
local_config_confidence.yml
159+
local_config_filtering.yml
158160
temp1.py
159161
temp5.py
160162
temp3.py

Dockerfile

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Stage 1: Build Environment Setup
2+
FROM nvidia/cuda:11.7.1-devel-ubuntu22.04 as builder
3+
4+
RUN apt-get update -y && apt-get install -y wget curl git tar bzip2 unzip && rm -rf /var/lib/apt/lists/*
5+
6+
# Create a user
7+
ENV APPUSER="appuser"
8+
ENV HOME=/home/$APPUSER
9+
RUN useradd -m -u 1000 $APPUSER
10+
USER $APPUSER
11+
WORKDIR $HOME
12+
13+
ENV ENV_NAME="diffdock"
14+
ENV DIR_NAME="ligbind"
15+
16+
# Install micromamba
17+
RUN curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xj bin/micromamba
18+
ENV PATH=$HOME/bin:$HOME/.local/bin:$PATH
19+
20+
# Copy and create Conda environment
21+
ENV ENV_FILE_NAME=environment.yml
22+
COPY --chown=$APPUSER:$APPUSER ./$ENV_FILE_NAME .
23+
RUN ~/bin/micromamba env create --file $ENV_FILE_NAME && ~/bin/micromamba clean -afy --quiet
24+
25+
# Copy application code
26+
COPY --chown=$APPUSER:$APPUSER cuda-ubuntu22.04 $HOME/$DIR_NAME
27+
28+
# Download models
29+
# These should download automatically on first inference
30+
# RUN curl -L -o diffdock_models_v1.1.zip "https://www.dropbox.com/scl/fi/drg90rst8uhd2633tyou0/diffdock_models.zip?rlkey=afzq4kuqor2jb8adah41ro2lz&dl=1" \
31+
# && mkdir -p $HOME/$DIR_NAME/workdir \
32+
# && unzip diffdock_models_v1.1.zip -d $HOME/$DIR_NAME/workdir
33+
34+
35+
# Stage 2: Runtime Environment
36+
FROM nvidia/cuda:11.7.1-runtime-ubuntu22.04
37+
38+
# Create user and setup environment
39+
ENV APPUSER="appuser"
40+
ENV HOME=/home/$APPUSER
41+
RUN useradd -m -u 1000 $APPUSER
42+
USER $APPUSER
43+
WORKDIR $HOME
44+
45+
ENV ENV_NAME="diffdock"
46+
ENV DIR_NAME="ligbind"
47+
48+
# Copy the Conda environment and application code from the builder stage
49+
COPY --from=builder --chown=$APPUSER:$APPUSER $HOME/micromamba $HOME/micromamba
50+
COPY --from=builder --chown=$APPUSER:$APPUSER $HOME/bin $HOME/bin
51+
COPY --from=builder --chown=$APPUSER:$APPUSER $HOME/$DIR_NAME $HOME/$DIR_NAME
52+
WORKDIR $HOME/$DIR_NAME
53+
54+
# Set the environment variables
55+
ENV MAMBA_ROOT_PREFIX=$HOME/micromamba
56+
ENV PATH=$HOME/bin:$HOME/.local/bin:$PATH
57+
RUN micromamba shell init -s bash --root-prefix $MAMBA_ROOT_PREFIX
58+
59+
# Precompute series for SO(2) and SO(3) groups
60+
RUN micromamba run -n ${ENV_NAME} python utils/precompute_series.py
61+
62+
# Expose ports for streamlit and gradio
63+
EXPOSE 7860 8501
64+
65+
# Default command
66+
CMD ["sh", "-c", "micromamba run -n ${ENV_NAME} python utils/print_device.py"]

0 commit comments

Comments
 (0)