Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
models/** filter=lfs diff=lfs merge=lfs -text
data/** filter=lfs diff=lfs merge=lfs -text
57 changes: 57 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Ignore generated or temporary files managed by the Workbench
.project/*
!.project/spec.yaml
!.project/configpacks

# General ignores
.DS_Store

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Temp directories, notebooks created by jupyterlab
.ipynb_checkpoints
.Trash-*/
.jupyter/
.local/

# Python distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Workbench Project Layout
data/scratch/*
!data/scratch/.gitkeep
10 changes: 10 additions & 0 deletions .project/configpacks
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*defaults.ContainerUser
*bash.PreBuild
*defaults.EnvVars
*defaults.Readme
*defaults.Entrypoint
*apt.PackageManager
*bash.PreLanguage
*python.PipPackageManager
*bash.PostBuild
*jupyterlab.JupyterLab
101 changes: 101 additions & 0 deletions .project/spec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
specVersion: v2
specMinorVersion: 2
meta:
name: generative-virtual-screening
image: generative-virtual-screening
description: ""
labels: []
createdOn: "2024-10-06T16:45:44Z"
defaultBranch: main
layout:
- path: src/
type: code
storage: git
- path: deploy/
type: code
storage: git
environment:
base:
registry: nvcr.io
image: nvidia/ai-workbench/python-basic:1.0.2
build_timestamp: "20231114175838"
name: Python Basic
supported_architectures: []
cuda_version: ""
description: A Python Base with Jupyterlab
entrypoint_script: ""
labels:
- ubuntu
- python3
- jupyterlab
apps:
- name: jupyterlab
type: jupyterlab
class: webapp
start_command: jupyter lab --allow-root --port 8888 --ip 0.0.0.0 --no-browser
--NotebookApp.base_url=\$PROXY_PREFIX --NotebookApp.default_url=/lab --NotebookApp.allow_origin='*'
health_check_command: '[ \$(echo url=\$(jupyter lab list | head -n 2 | tail
-n 1 | cut -f1 -d'' '' | grep -v ''Currently'' | sed "s@/?@/lab?@g") | curl
-o /dev/null -s -w ''%{http_code}'' --config -) == ''200'' ]'
stop_command: jupyter lab stop 8888
user_msg: ""
logfile_path: ""
timeout_seconds: 60
icon_url: ""
webapp_options:
autolaunch: true
port: "8888"
proxy:
trim_prefix: false
url_command: jupyter lab list | head -n 2 | tail -n 1 | cut -f1 -d' ' | grep
-v 'Currently'
programming_languages:
- python3
icon_url: ""
image_version: 1.0.2
os: linux
os_distro: ubuntu
os_distro_release: "22.04"
schema_version: v2
user_info:
uid: ""
gid: ""
username: ""
package_managers:
- name: apt
binary_path: /usr/bin/apt
installed_packages:
- curl
- git
- git-lfs
- python3
- gcc
- python3-dev
- python3-pip
- vim
- name: pip
binary_path: /usr/local/bin/pip
installed_packages:
- jupyterlab==4.0.7
- requests==2.31.0
package_manager_environment:
name: ""
target: ""
execution:
apps: []
resources:
gpu:
requested: 0
sharedMemoryMB: 0
secrets:
- variable: NGC_CLI_API_KEY
description: ""
mounts:
- type: project
target: /project/
description: Project directory
options: rw
- type: volume
target: /nvwb-shared-volume/
description: ""
options: volumeName=nvwb-shared-volume
34 changes: 33 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<h2><img align="center" src="https://github.com/NVIDIA-BioNeMo-blueprints/generative-virtual-screening/blob/main/nvidia-logo.png?raw=true">NVIDIA BioNeMo Blueprint: Generative Virtual Screening for Drug Discovery</h2>
<h2><img align="center" src="https://github.com/NVIDIA-NIM-Agent-Blueprints/generative-virtual-screening/blob/main/nvidia-logo.png?raw=true">NVIDIA NIM Agent Blueprints: Generative Virtual Screening for Drug Discovery</h2>

[![Open In AI Workbench](https://img.shields.io/badge/Open_In-AI_Workbench-76B900)](https://ngc.nvidia.com/open-ai-workbench/aHR0cHM6Ly9naXRodWIuY29tL05WSURJQS1CaW9OZU1vLWJsdWVwcmludHMvZ2VuZXJhdGl2ZS12aXJ0dWFsLXNjcmVlbmluZw==)

![Generative Virtual Screening for Drug Discovery-r2 (1)](https://github.com/user-attachments/assets/dbb1795a-7e3f-4363-9b20-4bc4d67d04bb)

Expand All @@ -15,6 +17,36 @@ cd ../src
jupyter notebook
```

### Quick Start With NVIDIA AI Workbench

[NVIDIA AI Workbench](https://www.nvidia.com/en-us/deep-learning-ai/solutions/data-science/workbench/) is a development environment manager that enables data scientists and developers to create, customize, collaborate, and migrate AI workloads and applications seamlessly across GPU systems, from laptops to cloud.

If you do not have NVIDIA AI Workbench installed, first complete the installation for AI Workbench [here](https://docs.nvidia.com/ai-workbench/user-guide/latest/installation/overview.html).

1. Fork this Project to your own GitHub namespace and copy the link

```
https://github.com/[your_namespace]/<project_name>
```

2. Open the NVIDIA AI Workbench App. Select a location to work in.

3. Clone this Project onto your desired machine by selecting **Clone Project** and providing the GitHub link.

4. Wait for the project to build. You can expand the bottom **Building** indicator to view real-time build logs.

5. When the build completes, set the following configurations.

* `Environment` &rarr; `Secrets`. Specify the ``NGC_CLI_API_KEY`` as a project secret. [Details](https://github.com/NVIDIA-NIM-Agent-Blueprints/generative-virtual-screening/tree/main/deploy#get-your-api-key)

6. Under `Environment` &rarr; `Compose`, select **Start**. This will pull and start the three NIM containers in the blueprint, which can take some time.

* You can track progress under the ``Output`` widget. Specify ``Compose`` from the dropdown menu.

7. On the top right of the AI Workbench window, select **Open Jupyterlab**. It should automatically open in a new browser window.

8. Navigate to ``src/generative-virtual-screening.ipynb`` and get started!

### Get Started

* [Deploy](deploy/)
Expand Down
Empty file added deploy/.gitkeep
Empty file.
9 changes: 9 additions & 0 deletions deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ In this directory you will find a Docker Compose yaml file that will start up
the NIMs for AlphaFold-2, MolMIM, and DiffDock. Once the NIMs are started, you
will probably then want to take a look the example notebook in the `src` directory.

#### NVIDIA AI Workbench

For developers using [NVIDIA AI Workbench](https://www.nvidia.com/en-us/deep-learning-ai/solutions/data-science/workbench/) to run this blueprint,

1. Deploy the NIMs by selecting **Start** under ``Environment`` > ``Compose``.
2. Select **Open Jupyterlab** on the top right and get started with the [notebook](../src/generative-virtual-screening.ipynb).

Full quickstart instructions can be found [here](https://github.com/NVIDIA-AI-Blueprints/generative-virtual-screening/blob/main/README.md#quick-start-with-nvidia-ai-workbench). For all other users, continue below.

### Prerequisites

You will need to install:
Expand Down
19 changes: 14 additions & 5 deletions deploy/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,42 @@ version: '3'

services:
alphafold:
image: nvcr.io/nim/deepmind/alphafold2:1.0.0
image: nvcr.io/nim/deepmind/alphafold2:2.1.0
runtime: nvidia
ports:
- "8081:8000"
volumes:
- ${ALPHAFOLD2_CACHE:-~/.cache/nim/models}:/opt/nim/.cache/
- type: bind
source: ${ALPHAFOLD2_CACHE:-~/.cache/nim}
target: /opt/nim/.cache/
environment:
- NGC_CLI_API_KEY=${NGC_CLI_API_KEY:?Error NGC_CLI_API_KEY not set}
- NGC_API_KEY=${NGC_CLI_API_KEY:?Error NGC_CLI_API_KEY not set}
- NVWB_TRIM_PREFIX=true

diffdock:
image: nvcr.io/nim/mit/diffdock:1.2.0
runtime: nvidia
ports:
- "8082:8000"
volumes:
- ${DIFFDOCK_CACHE:-~/.cache/nim}:/home/nvs/.cache/nim/models/
- type: bind
source: ${DIFFDOCK_CACHE:-~/.cache/nim}
target: /opt/nim/.cache/nim/models/

environment:
- NGC_CLI_API_KEY=${NGC_CLI_API_KEY:?Error NGC_CLI_API_KEY not set}
- NVIDIA_VISIBLE_DEVICES=${DIFFDOCK_VISIBLE_DEVICES:-0}
- NVWB_TRIM_PREFIX=true

molmim:
image: nvcr.io/nim/nvidia/molmim:1.0.0
runtime: nvidia
ports:
- "8083:8000"
volumes:
- ${MOLMIM_CACHE:-~/.cache/nim}:/home/nvs/.cache/nim/models/
- type: bind
source: ${MOLMIM_CACHE:-~/.cache/nim}
target: /opt/nim/.cache/nim/models/
environment:
- NGC_CLI_API_KEY=${NGC_CLI_API_KEY:?Error NGC_CLI_API_KEY not set}
- NVWB_TRIM_PREFIX=true
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
jupyterlab>3.0
requests==2.31.0
Empty file added src/.gitkeep
Empty file.
7 changes: 7 additions & 0 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,11 @@ instance and get going immediately!
jupyter notebook
```

#### NVIDIA AI Workbench

For developers using [NVIDIA AI Workbench](https://www.nvidia.com/en-us/deep-learning-ai/solutions/data-science/workbench/) to run this blueprint,

1. Deploy the NIMs by selecting **Start** under ``Environment`` > ``Compose``.
2. Select **Open Jupyterlab** on the top right and get started with the [notebook](./generative-virtual-screening.ipynb).

Full quickstart instructions can be found [here](https://github.com/NVIDIA-AI-Blueprints/generative-virtual-screening/blob/main/README.md#quick-start-with-nvidia-ai-workbench).
Loading