ESM-2 protein language model container image (CUDA 12.8)¶
1. What this image is¶
firesimulations/esm:2-cuda12.8-r1 is an ESM-2 protein embedding image for NVIDIA GPUs. It is built on the ml-qsar image (unchanged: every base package is held at its version) and adds Transformers 5.23.0, safetensors 0.8.0, Biopython 1.88 and scikit-learn 1.9.1. Read-only weights of facebook/esm2_t33_650M_UR50D (650 M parameters) and facebook/esm2_t12_35M_UR50D (35 M) are cached in the image at pinned Hugging Face revisions; the runtime is offline. Linux amd64 only.
2. Tags and versions¶
| Tag | Contents |
|---|---|
2-cuda12.8-r1 |
ESM-2 (two model sizes) on the ml-qsar stack |
Tag pattern: <version>-cuda<CUDA>-r<N>. The version 2 is the ESM model generation (ESM-2); ESM-2 has no software release number.
A published tag never changes; a changed image gets the next -rN (tags and revisions). Digests and DOIs: release notes.
3. Get the image¶
docker pull firesimulations/esm:2-cuda12.8-r1
docker pull firesimulations/esm@sha256:<digest of the release note> # byte-exact; preferred in papers
Without Docker Hub, download the archive from the Zenodo record of the tag and follow load an image from Zenodo. See also verify an image.
This image needs an NVIDIA driver and Docker GPU support: see NVIDIA GPU setup.
4. Quick start¶
docker run --rm --gpus all firesimulations/esm:2-cuda12.8-r1
docker run --rm --gpus all -u "$(id -u):$(id -g)" -v "$PWD:/workspace" -w /workspace -e HOME=/tmp -e NUMBA_CACHE_DIR=/tmp/numba firesimulations/esm:2-cuda12.8-r1 python workflow.py
docker run --rm --gpus all -v "${PWD}:/workspace" -w /workspace firesimulations/esm:2-cuda12.8-r1 python workflow.py
The default command embeds a test sequence with both models on the GPU. The image runs as root unless you pass -u; for other users or a read-only root file system set -e HOME=/tmp -e NUMBA_CACHE_DIR=/tmp/numba. The environment sets HF_HUB_OFFLINE=1 and TRANSFORMERS_OFFLINE=1: models come only from the cache in the image.
5. What is inside¶
| Component | Version |
|---|---|
| ESM-2 weights | facebook/esm2_t33_650M_UR50D at revision 08e4846e537177426273712802403f7ba8261b6c; facebook/esm2_t12_35M_UR50D at 6fbf070e65b0b7291e7bbcd451118c216cff79d8 (cache in /opt/hf-cache) |
| Transformers, safetensors | 5.23.0, 0.8.0 |
| Biopython, scikit-learn | 1.88, 1.9.1 |
| huggingface-hub, tokenizers | 2.4.0, 0.23.3 |
| PyTorch | 2.8.0+cu128 (from the ml-qsar base) |
Everything in the base image is described in the ml-qsar manual.
The complete package list is software-versions.txt in each Zenodo record; the SBOM is sbom.spdx.json.
6. Usage guide¶
from transformers import AutoTokenizer, EsmForMaskedLM
import torch
name = "facebook/esm2_t12_35M_UR50D" # or facebook/esm2_t33_650M_UR50D
tok = AutoTokenizer.from_pretrained(name)
model = EsmForMaskedLM.from_pretrained(name).to("cuda").eval()
batch = tok(["MKTAYIAKQRQISFVKSHFSRQLEERLGLIEVQAPILSRVGDGTQDNLSGAEKAVQVKVKALPDAQFEVV"], return_tensors="pt").to("cuda")
with torch.inference_mode():
out = model(**batch, output_hidden_states=True)
emb = out.hidden_states[-1] # shape (1, length + 2, 480) for the 35 M model; 1280 for the 650 M model
The embedding widths are 480 (35 M model) and 1280 (650 M model), as checked at release.
7. Input and output conventions¶
| Item | Value |
|---|---|
| Working directory | /workspace |
| Weights | /opt/hf-cache (read-only), offline |
| Environment | HOME, NUMBA_CACHE_DIR writable when not running as root |
8. Performance and resources¶
The 650 M model needs several GB of GPU memory; the 35 M model runs on small GPUs. Batch size and sequence length decide memory use.
9. Verification¶
docker run --rm --gpus all firesimulations/esm:2-cuda12.8-r1
Expected: embedding width 1280 OK and embedding width 480 OK, the CUDA version and GPU name, and the package versions. The release pipeline ran it with a GPU as root and as uid 4242 on a read-only root file system.
The release pipeline additionally ran the image's smoke test as the image user and as uid 4242 on a read-only root file system, scanned the image for fixable critical or high vulnerabilities and for embedded secrets, and recorded the results in the release note and in smoke-test-report.txt of the Zenodo record.
10. Reproducibility checklist for a paper¶
Record: the tag, the digest and the version DOI of the release note; the exact command lines; the SHA-256 of every input file; the model name and revision (above), the sequence set and its hash, batch size, the GPU and driver, and whether half precision was used.
11. How to cite¶
Primary reference: this container image. If you use this image, cite its Zenodo record (the version DOI of the tag you used):
Noor, D. H. (2026). ESM-2 protein language model container image (CUDA 12.8) (Version 2-cuda12.8-r1+doc2) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.24628467
@software{scdoc_esm_2_cuda12_8_r1_doc2,
author = {Noor, Dilwar Hossain},
title = {ESM-2 protein language model container image (CUDA 12.8)},
version = {2-cuda12.8-r1+doc2},
year = {2026},
publisher = {Zenodo},
doi = {10.5281/zenodo.24628467},
url = {https://doi.org/10.5281/zenodo.24628467}
}
All versions of this image line: concept DOI 10.5281/zenodo.24617761. Each Zenodo record also contains CITATION.cff and CITATION.bib; the release notes list every tag.
Secondary references: the programs inside this image. Please also cite the original publications of the programs you used:
- ESM-2: Lin, Z. et al. (2023). Evolutionary-scale prediction of atomic-level protein structure with a language model. Science 379, 1123–1130. https://doi.org/10.1126/science.ade2574
- Transformers: Wolf, T. et al. (2020). Transformers: State-of-the-art natural language processing. EMNLP 2020: System Demonstrations, 38–45.
12. Licences and source offer¶
The ESM-2 weights are released under the MIT licence (model cards of the two models). Transformers and safetensors are Apache-2.0; Biopython has its own permissive licence; scikit-learn is BSD-3-Clause; the remaining packages are those of the ml-qsar image; the NVIDIA CUDA runtime wheels fall under the NVIDIA EULA. Per-package licences are in THIRD_PARTY_LICENSES.txt and the SBOM of the Zenodo record.
Source offer. Packages come from PyPI at the versions above; weights from Hugging Face at the pinned revisions. Sources are available from the upstream projects. On request to the maintainer, the corresponding source of any GPL/LGPL component will be provided for three years from the release date. The build recipe is not distributed.
13. Known limits and troubleshooting¶
- A GPU is required for the default test.
- Only the two named ESM-2 models are cached; other models need network access, which is switched off by the offline variables.
- Large image (about 6 GB compressed).
14. Changelog¶
| Tag | Date | Change |
|---|---|---|
2-cuda12.8-r1 |
2026-11-28 | first release |