Skip to content

Commit 7be8db3

Browse files
committed
Remove ngcsdk re-installs. Remove Apex dependency.
Signed-off-by: Cory Ye <[email protected]>
1 parent 21157c4 commit 7be8db3

File tree

17 files changed

+21
-34
lines changed

17 files changed

+21
-34
lines changed

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ RUN rm -rf /opt/pytorch/pytorch/third_party/onnx
140140
# environment, and does not use the current uv.lock file. Note that with python 3.12, we now need to set
141141
# UV_BREAK_SYSTEM_PACKAGES, since the pytorch base image has made the decision not to use a virtual environment and UV
142142
# does not respect the PIP_BREAK_SYSTEM_PACKAGES environment variable set in the base dockerfile.
143-
COPY --from=ghcr.io/astral-sh/uv:0.4.25 /uv /usr/local/bin/uv
143+
COPY --from=ghcr.io/astral-sh/uv:0.6.13 /uv /usr/local/bin/uv
144144
ENV UV_LINK_MODE=copy \
145145
UV_COMPILE_BYTECODE=1 \
146146
UV_PYTHON_DOWNLOADS=never \
@@ -175,7 +175,7 @@ uv pip install maturin --no-build-isolation
175175
git clone https://github.com/NVIDIA/nvidia-resiliency-ext
176176
uv pip install nvidia-resiliency-ext/
177177
rm -rf nvidia-resiliency-ext/
178-
# ngcsdk causes strange dependency conflicts that we will resolve later
178+
# ngcsdk causes strange dependency conflicts (ngcsdk requires protobuf<4, but nemo_toolkit requires protobuf==4.24.4, deleting it from the uv pip install prevents installation conflicts)
179179
sed -i "/ngcsdk/d" ./sub-packages/bionemo-core/pyproject.toml
180180
# Remove llama-index because bionemo doesn't use it and it adds CVEs to container
181181
sed -i "/llama-index/d" ./3rdparty/NeMo/requirements/requirements_nlp.txt
@@ -185,7 +185,7 @@ uv pip install --no-build-isolation \
185185
-r /requirements-cve.txt \
186186
-r /requirements-test.txt
187187

188-
# Install back ngcsdk. Somehow doing it here avoids a large dependency loop
188+
# Install back ngcsdk, as a WAR for the protobuf version conflict with nemo_toolkit.
189189
uv pip install ngcsdk
190190

191191
# Addressing security scan issue - CVE vulnerability https://github.com/advisories/GHSA-g4r7-86gm-pgqc The package is a
@@ -234,7 +234,7 @@ USER $USERNAME
234234
COPY --from=bionemo2-base --chown=$USERNAME:$USERNAME --chmod=777 \
235235
/usr/local/lib/python3.12/dist-packages /usr/local/lib/python3.12/dist-packages
236236

237-
COPY --from=ghcr.io/astral-sh/uv:0.4.25 /uv /usr/local/bin/uv
237+
COPY --from=ghcr.io/astral-sh/uv:0.6.13 /uv /usr/local/bin/uv
238238
ENV UV_LINK_MODE=copy \
239239
UV_COMPILE_BYTECODE=0 \
240240
UV_PYTHON_DOWNLOADS=never \

sub-packages/bionemo-amplify/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ readme = "README.md"
99
description = "A BioNeMo sub-package for training AMPLIFY models."
1010
authors = [{ name = "BioNeMo Team", email = "[email protected]" }]
1111
requires-python = ">=3.10"
12-
license-files = ["LICENSE"]
12+
license = { file = "LICENSE" }
1313
dynamic = ["version"]
1414
dependencies = [
1515
# internal

sub-packages/bionemo-core/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ readme = "README.md"
88
description = "BioNeMo core interfaces and PyTorch-related code."
99
authors = [{ name = "BioNeMo Team", email = "[email protected]" }]
1010
requires-python = ">=3.10"
11-
license-files = ["LICENSE"]
11+
license = { file = "LICENSE" }
1212
dynamic = ["version"]
1313
dependencies = [
1414
# bionemo sub-packages

sub-packages/bionemo-esm2/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ readme = "README.md"
88
description = "BioNeMo ESM2 model."
99
authors = [{ name = "BioNeMo Team", email = "[email protected]" }]
1010
requires-python = ">=3.10"
11-
license-files = ["LICENSE"]
11+
license = { file = "LICENSE" }
1212
dynamic = ["version"]
1313
dependencies = [
1414
# internal

sub-packages/bionemo-evo2/pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ readme = "README.md"
88
description = "Library containing data preprocessing, training, and inference tooling for Evo2."
99
authors = [{ name = "BioNeMo Team", email = "[email protected]" }]
1010
requires-python = ">=3.10"
11-
license-files = ["LICENSE"]
11+
license = { file = "LICENSE" }
1212
dynamic = ["version"]
1313
dependencies = [
14+
# internal
1415
"bionemo-noodles",
1516
"bionemo-core",
1617
"bionemo-llm",
18+
# external
1719
]
1820

1921
[project.optional-dependencies]

sub-packages/bionemo-example_model/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ description = "BioNeMo example_model: Example model for documentation and tutori
1212
authors = [{ name = "BioNeMo Team", email = "[email protected]" }]
1313
requires-python = ">=3.10"
1414
classifiers = ["Private :: Do Not Upload", "Programming Language :: Python :: 3.10"]
15-
license-files = ["LICENSE"]
15+
license = { file = "LICENSE" }
1616
dynamic = ["version"]
1717
dependencies = [
1818
'bionemo-core',

sub-packages/bionemo-fw/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ readme = "README.md"
88
description = "BioNeMo Framework (FW): Production grade framework for AI-enabled Drug Discovery. Consists of all independently installable bionemo feature packages too."
99
authors = [{ name = "BioNeMo Team", email = "[email protected]" }]
1010
requires-python = ">=3.10"
11-
license-files = ["LICENSE"]
11+
license = { file = "LICENSE" }
1212
dynamic = ["version"]
1313
dependencies = [
1414
'bionemo-core',

sub-packages/bionemo-geneformer/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ readme = "README.md"
88
description = "BioNeMo Geneformer"
99
authors = [{ name = "BioNeMo Team", email = "[email protected]" }]
1010
requires-python = ">=3.10"
11-
license-files = ["LICENSE"]
11+
license = { file = "LICENSE" }
1212
dynamic = ["version"]
1313
dependencies = [
1414
# bionemo sub-packages

sub-packages/bionemo-geometric/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ readme = "README.md"
88
description = "BioNeMo component library for graphical neural networks (GNNs) solving drug discovery problems."
99
authors = [{ name = "BioNeMo Team", email = "[email protected]" }]
1010
requires-python = ">=3.10"
11-
license-files = ["LICENSE"]
11+
license = { file = "LICENSE" }
1212
dynamic = ["version"]
1313
dependencies = [
1414
'bionemo-core',

sub-packages/bionemo-llm/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ readme = "README.md"
88
description = "BioNeMo Large Language Model Components using NeMo and Megatron"
99
authors = [{ name = "BioNeMo Team", email = "[email protected]" }]
1010
requires-python = ">=3.10"
11-
license-files = ["LICENSE"]
11+
license = { file = "LICENSE" }
1212
dynamic = ["version"]
1313
dependencies = [
1414
# bionemo sub-packages

sub-packages/bionemo-llm/src/bionemo/llm/model/biobert/lightning.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
from nemo.lightning.megatron_parallel import DataT, MegatronLossReduction
2525
from nemo.lightning.pytorch.optim import MegatronOptimizerModule
2626
from torch import Tensor
27-
from torch.optim import Adam
2827
from transformers.tokenization_utils_base import PreTrainedTokenizerBase
2928

3029
from bionemo.llm.lightning import (
@@ -40,7 +39,6 @@
4039
"BertBatch",
4140
"BertModel",
4241
"SequenceBatch",
43-
"bert_default_optimizer",
4442
"bert_forward_step",
4543
"biobert_data_step",
4644
"biobert_lightning_module",
@@ -182,19 +180,6 @@ def biobert_lightning_module(
182180
)
183181

184182

185-
def bert_default_optimizer(model: torch.nn.Module):
186-
"""Returns the default optimizer for the BERT model.
187-
188-
Args:
189-
model: The BERT model.
190-
191-
Returns:
192-
The default optimizer initialized for this BERT module's parameters.
193-
Uses a learning rate of 1e-4 and weight decay of 1e-2.
194-
"""
195-
return Adam(model.parameters(), lr=1e-4, weight_decay=0.01)
196-
197-
198183
def get_batch_on_this_context_parallel_rank(batch: Dict[str, Tensor], in_place: bool = True) -> Dict[str, Tensor]:
199184
"""Ensures that the input batch is in the right format for context parallel rank.
200185

sub-packages/bionemo-moco/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ readme = "README.md"
88
description = "BioNeMo Modular Co-Design: Making building Diffusion and Flow Matching generative models easier"
99
authors = [{ name = "BioNeMo Team", email = "[email protected]" }]
1010
requires-python = ">=3.10"
11-
license-files = ["LICENSE"]
11+
license = { file = "LICENSE" }
1212
dynamic = ["version"]
1313
dependencies = [
1414
# bionemo sub-packages

sub-packages/bionemo-noodles/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ readme = "README.md"
88
description = "Python wrapper around [noodles](https://github.com/zaeleus/noodles)."
99
authors = [{ name = "BioNeMo Team", email = "[email protected]" }]
1010
requires-python = ">=3.10"
11-
license-files = ["LICENSE"]
11+
license = { file = "LICENSE" }
1212
dynamic = ["version"]
1313
dependencies = [
1414
# internal

sub-packages/bionemo-scdl/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ readme = "README.md"
88
description = "SCDL, a Dataset class for Single Cell data."
99
authors = [{ name = "BioNeMo Team", email = "[email protected]" }]
1010
requires-python = ">=3.10"
11-
license-files = ["LICENSE"]
11+
license = { file = "LICENSE" }
1212
dynamic = ["version"]
1313
dependencies = [
1414
# bionemo sub-packages

sub-packages/bionemo-size-aware-batching/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ readme = "README.md"
88
description = "Provides a simple way to create mini-batches in a memory consumption-aware manner, making it useful for tasks like training models on datasets with varying memory requirements."
99
authors = [{ name = "BioNeMo Team", email = "[email protected]" }]
1010
requires-python = ">=3.10"
11-
license-files = ["LICENSE"]
11+
license = { file = "LICENSE" }
1212
dynamic = ["version"]
1313
dependencies = [
1414
# bionemo sub-packages

sub-packages/bionemo-testing/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ readme = "README.md"
88
description = "Utilities aiding test creation for BioNeMo sub-packages."
99
authors = [{ name = "BioNeMo Team", email = "[email protected]" }]
1010
requires-python = ">=3.10"
11-
license-files = ["LICENSE"]
11+
license = { file = "LICENSE" }
1212
dynamic = ["version"]
1313
dependencies = [
1414
# bionemo sub-packages

sub-packages/bionemo-webdatamodule/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ readme = "README.md"
88
description = "PyTorch Lightning Data Module for WebDataset files."
99
authors = [{ name = "BioNeMo Team", email = "[email protected]" }]
1010
requires-python = ">=3.10"
11-
license-files = ["LICENSE"]
11+
license = { file = "LICENSE" }
1212
dynamic = ["version"]
1313
dependencies = [
1414
# bionemo sub-packages

0 commit comments

Comments
 (0)