-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #182 from gcorso/dev_v1.1
Version 1.1
- Loading branch information
Showing
97 changed files
with
237,569 additions
and
4,717 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
# Ignore hidden files and folders | ||
**/.* | ||
.DS_store | ||
|
||
# Ignore git directories (redundant) | ||
.git | ||
.gitattributes | ||
|
||
# Ignore generated user results | ||
results/* | ||
tmp/ | ||
|
||
# Ignore trained models | ||
workdir/* | ||
|
||
# Do not include PDBBind files | ||
# (quite likely they are in the same directory) | ||
**/pdbbind_sequences.fasta | ||
**/PDBBind_processed/ | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
local_config_inference2.yml | ||
.vscode/ | ||
|
||
|
||
*.zip | ||
|
||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Stage 1: Build Environment Setup | ||
FROM nvidia/cuda:11.7.1-devel-ubuntu22.04 as builder | ||
|
||
RUN apt-get update -y && apt-get install -y wget curl git tar bzip2 unzip && rm -rf /var/lib/apt/lists/* | ||
|
||
# Create a user | ||
ENV APPUSER="appuser" | ||
ENV HOME=/home/$APPUSER | ||
RUN useradd -m -u 1000 $APPUSER | ||
USER $APPUSER | ||
WORKDIR $HOME | ||
|
||
ENV ENV_NAME="diffdock" | ||
ENV DIR_NAME="ligbind" | ||
|
||
# Install micromamba | ||
RUN curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xj bin/micromamba | ||
ENV PATH=$HOME/bin:$HOME/.local/bin:$PATH | ||
|
||
# Copy and create Conda environment | ||
ENV ENV_FILE_NAME=environment.yml | ||
COPY --chown=$APPUSER:$APPUSER ./$ENV_FILE_NAME . | ||
RUN ~/bin/micromamba env create --file $ENV_FILE_NAME && ~/bin/micromamba clean -afy --quiet | ||
|
||
# Copy application code | ||
COPY --chown=$APPUSER:$APPUSER cuda-ubuntu22.04 $HOME/$DIR_NAME | ||
|
||
# Download models | ||
# These should download automatically on first inference | ||
# RUN curl -L -o diffdock_models_v1.1.zip "https://www.dropbox.com/scl/fi/drg90rst8uhd2633tyou0/diffdock_models.zip?rlkey=afzq4kuqor2jb8adah41ro2lz&dl=1" \ | ||
# && mkdir -p $HOME/$DIR_NAME/workdir \ | ||
# && unzip diffdock_models_v1.1.zip -d $HOME/$DIR_NAME/workdir | ||
|
||
|
||
# Stage 2: Runtime Environment | ||
FROM nvidia/cuda:11.7.1-runtime-ubuntu22.04 | ||
|
||
# Create user and setup environment | ||
ENV APPUSER="appuser" | ||
ENV HOME=/home/$APPUSER | ||
RUN useradd -m -u 1000 $APPUSER | ||
USER $APPUSER | ||
WORKDIR $HOME | ||
|
||
ENV ENV_NAME="diffdock" | ||
ENV DIR_NAME="ligbind" | ||
|
||
# Copy the Conda environment and application code from the builder stage | ||
COPY --from=builder --chown=$APPUSER:$APPUSER $HOME/micromamba $HOME/micromamba | ||
COPY --from=builder --chown=$APPUSER:$APPUSER $HOME/bin $HOME/bin | ||
COPY --from=builder --chown=$APPUSER:$APPUSER $HOME/$DIR_NAME $HOME/$DIR_NAME | ||
WORKDIR $HOME/$DIR_NAME | ||
|
||
# Set the environment variables | ||
ENV MAMBA_ROOT_PREFIX=$HOME/micromamba | ||
ENV PATH=$HOME/bin:$HOME/.local/bin:$PATH | ||
RUN micromamba shell init -s bash --root-prefix $MAMBA_ROOT_PREFIX | ||
|
||
# Precompute series for SO(2) and SO(3) groups | ||
RUN micromamba run -n ${ENV_NAME} python utils/precompute_series.py | ||
|
||
# Expose ports for streamlit and gradio | ||
EXPOSE 7860 8501 | ||
|
||
# Default command | ||
CMD ["sh", "-c", "micromamba run -n ${ENV_NAME} python utils/print_device.py"] |
Oops, something went wrong.