Files
AlphaPulldown/docker/alphafold2.dockerfile
Dima fff63051b4 Tests (#600)
* Harden MMseqs species ID resolution fallback

* Reorganize tests for CPU coverage CI

* New

* Fix function coverage checker def-line false positives

* Expand unit coverage for helper and backend manager utilities

* New.

* New.

* Expand unit coverage for template and post-processing helpers

* Expand unit coverage for objects.py edge cases

* Publish HTML coverage reports via GitHub Pages

* Add CPU unit coverage for AlphaFold3 backend helpers

* Reorganize tests and expand backend coverage

* Reset shared test flags between cases

* Expand AF3 prepare_input unit coverage

* Cover AF3 and truemultimer feature creation

* Test AF3 multimer MSA translation paths

* Cover AF3 duplicate-residue multimer fallback

* Cover AF2 resume and postprocess edge paths

* Cover AF3 template mmCIF preparation

* Test small script entry points

* Expand workflow and ModelCIF test coverage

* Add backend extras and install guide

* Clarify AF3 backend installation path

* Stabilize cluster GPU test runners

* Document AF3 CMake SQLite hints

* Simplify backend installation guide

* Align AF3 install with working cluster env

* Backfill typing dataclass_transform for AF2

* Pin TensorFlow for cluster installs

* Fallback AF2 relax when CUDA OpenMM is unavailable

* Raise AF3 default minimum bucket size

* Simplify backend cluster installation guide

* Fix AF3 wrapper JSON output isolation

* Fix AF3 JSON wrapper outputs and MMseqs ID parsing

* Fix CI entrypoint stub and Python 3.8 typing

* Document release readiness test gates
2026-04-01 14:13:35 +02:00

83 lines
2.9 KiB
Docker

# syntax=docker/dockerfile:1.4
ARG CUDA=12.2.2
FROM nvidia/cuda:${CUDA}-cudnn8-runtime-ubuntu20.04
ARG CUDA
SHELL ["/bin/bash","-o","pipefail","-c"]
# Trim docs/locales to shrink APT-installed footprint
RUN set -eux; \
echo 'path-exclude=/usr/share/man/*' > /etc/dpkg/dpkg.cfg.d/01_nodoc; \
echo 'path-exclude=/usr/share/doc/*' >> /etc/dpkg/dpkg.cfg.d/01_nodoc; \
echo 'path-exclude=/usr/share/locale/*' >> /etc/dpkg/dpkg.cfg.d/01_nodoc; \
echo 'path-include=/usr/share/locale/en*' >> /etc/dpkg/dpkg.cfg.d/01_nodoc; \
printf 'Acquire::Languages "none";\n' > /etc/apt/apt.conf.d/99no-languages
# Only minimal runtime deps to bootstrap micromamba; no upgrade, no dev toolchain
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
set -eux; \
apt-get update; \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates curl bzip2 tzdata openssh-client; \
rm -rf /var/lib/apt/lists/*
# Micromamba bootstrap (smaller than Miniforge)
ENV MAMBA_ROOT_PREFIX=/opt/conda
RUN set -eux; \
mkdir -p "$MAMBA_ROOT_PREFIX"; \
curl -k -L https://micro.mamba.pm/api/micromamba/linux-64/latest \
| tar -xj -C /usr/local/bin --strip-components=1 bin/micromamba
ENV PATH="/opt/conda/bin:${PATH}"
ENV LD_LIBRARY_PATH="/opt/conda/lib:${LD_LIBRARY_PATH}"
RUN set -eux; \
micromamba install -y -r "/opt/conda" -n base \
-c conda-forge -c bioconda \
python=3.11 \
kalign2 \
modelcif \
hmmer \
hhsuite \
"numpy<2" \
"openmm>=8.2" \
"pdbfixer>=1.10" \
pip \
git \
&& micromamba clean -a -y
#RUN micromamba run -n base python -m pip install --no-cache-dir "openmm==8.1.1"
RUN python -m pip install --no-cache-dir "setuptools<82" # setuptools>82 breaks pdbfixer at relaxation
# Clone from repo
RUN mkdir -p /root/.ssh && chmod 700 /root/.ssh
RUN ssh-keyscan github.com >> /root/.ssh/known_hosts
RUN git clone --recurse-submodules https://github.com/KosinskiLab/AlphaPulldown.git
WORKDIR AlphaPulldown
#DEBUG
#WORKDIR /AlphaPulldown
#COPY . /AlphaPulldown
RUN pip install --no-build-isolation .
RUN pip3 install --upgrade pip --no-cache-dir \
&& pip3 install --upgrade --no-cache-dir \
"jax[cuda12]"==0.5.3
# Strip Python caches to reduce layer size
RUN find /opt/conda -type d -name "__pycache__" -prune -exec rm -rf {} + \
&& find /opt/conda -type f -name "*.pyc" -delete \
&& find /AlphaPulldown -type d -name "__pycache__" -prune -exec rm -rf {} + \
&& find /AlphaPulldown -type f -name "*.pyc" -delete
# Clean out APT bootstrap tools (curl/bzip2) to shave a bit more
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
set -eux; \
apt-get purge -y curl bzip2 || true; \
apt-get autoremove -y; \
apt-get clean; \
rm -rf /var/lib/apt/lists/* /root/.cache
#ENTRYPOINT ["bash"]