-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile.base
More file actions
133 lines (119 loc) · 4.79 KB
/
Copy pathDockerfile.base
File metadata and controls
133 lines (119 loc) · 4.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# ==============================================================================
# NatureBench base image for ML task containers
# ==============================================================================
# Build: docker build -t naturebench-base:v3 -f Dockerfile.base .
# ==============================================================================
# Release base image notes:
# - CUDA 12.6 → 11.8 for broader host-driver compatibility
# - PyTorch index-url cu126 → cu118 while keeping torch 2.6.0
# - numpy pinned to 1.26.4 (torch cu118 wheels require numpy<2.0)
# - All pip packages remain pinned for reproducibility
# ==============================================================================
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ENV DEBIAN_FRONTEND=noninteractive \
PIP_NO_CACHE_DIR=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
# This base image is shared by many task images, so it should cover the common
# scientific Python stack while avoiding heavyweight or fast-moving frameworks
# that frequently break dependency resolution. Task-specific images can add
# TensorFlow, JAX, Scanpy, or any other specialized packages as needed.
# ── System dependencies + Python 3.11 ────────────────────────────────────────
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
software-properties-common \
build-essential \
cmake \
gfortran \
git \
wget \
curl \
unzip \
zip \
vim \
swig \
libffi-dev \
libssl-dev \
libhdf5-dev \
libopenblas-dev \
libsm6 \
libxext6 \
libgl1 \
libglib2.0-0 \
ffmpeg \
&& add-apt-repository ppa:deadsnakes/ppa -y \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
python3.11 \
python3.11-dev \
python3.11-venv \
&& rm -rf /var/lib/apt/lists/*
# Keep Ubuntu's system python3 untouched for OS tooling like apt, but put an
# isolated Python 3.11 environment first on PATH for solver code.
RUN python3.11 -m venv /opt/py311 \
&& /opt/py311/bin/python -m pip install --upgrade pip setuptools wheel
ENV VIRTUAL_ENV=/opt/py311 \
PATH="/opt/py311/bin:${PATH}"
# ── Core Scientific Computing ────────────────────────────────────────────────
RUN python -m pip install \
numpy==1.26.4 \
scipy==1.14.1 \
pandas==2.2.3 \
matplotlib==3.10.0 \
seaborn==0.13.2 \
h5py==3.12.1 \
tables==3.10.1 \
pyarrow==18.1.0 \
networkx==3.4.2 \
igraph==0.11.8 \
sympy==1.13.1 \
statsmodels==0.14.4 \
scikit-image==0.24.0 \
opencv-python-headless==4.11.0.86 \
Pillow==11.1.0 \
tqdm==4.67.1 \
rich==13.9.4 \
jupyter==1.1.1
# ── ML Frameworks ────────────────────────────────────────────────────────────
RUN python -m pip install \
torch==2.6.0 \
torchvision==0.21.0 \
torchaudio==2.6.0 \
--index-url https://download.pytorch.org/whl/cu118
RUN python -m pip install \
scikit-learn==1.6.1 \
xgboost==2.1.3 \
lightgbm==4.5.0 \
catboost==1.2.7
# ── Deep Learning Ecosystem ──────────────────────────────────────────────────
RUN python -m pip install \
transformers==4.48.1 \
datasets==3.2.0 \
tokenizers==0.21.0 \
lightning==2.5.0 \
einops==0.8.0 \
timm==1.0.12 \
accelerate==1.3.0 \
optuna==4.2.0 \
safetensors==0.5.2 \
sentencepiece==0.2.0 \
wandb==0.19.1
# ── Domain Libraries ─────────────────────────────────────────────────────────
RUN python -m pip install \
anndata==0.11.3 \
biopython==1.85 \
rdkit==2024.9.6 \
ase==3.23.0 \
pymatgen==2024.11.13 \
nibabel==5.3.2 \
nilearn==0.11.1
# ── Node.js + Agent CLIs (Claude Code, Codex, Gemini) ──────────────────────
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
&& apt-get install -y --no-install-recommends nodejs \
&& rm -rf /var/lib/apt/lists/* \
&& npm install -g @anthropic-ai/claude-code @openai/codex @google/gemini-cli
# ── Cleanup ──────────────────────────────────────────────────────────────────
ENV DEBIAN_FRONTEND=
WORKDIR /home