# Reproducible, version-pinned image for running MPATH -- the artifact that
# Docker/Singularity-based pipelines (Nextflow, Snakemake, ...) consume.
#
# MPATH is a pure-Python package, so this just installs it from PyPI. The
# upstream preprocessing tools (dorado, modkit, samtools) are NOT included --
# they are large and version-sensitive; run them in their own images/steps and
# feed the resulting modkit calls + WGBS bed into `mpath metrics` here.
#
# Built and pushed to ghcr.io/<owner>/mpath:<version> by the release workflow.
# To build locally:
#   docker build --build-arg VERSION=0.1.0 -t mpath:0.1.0 .
FROM python:3.12-slim

LABEL org.opencontainers.image.source="https://github.com/downinglab/mpath"
LABEL org.opencontainers.image.description="MPATH: methylation pseudotime analysis for Nanopore long reads"
LABEL org.opencontainers.image.licenses="MIT"

# Pin at build time. The release workflow passes the tag's version; an empty
# VERSION (local builds) installs the latest release from PyPI.
ARG VERSION=
RUN pip install --no-cache-dir "mpath-pseudotime${VERSION:+==${VERSION}}"

# Default to the CLI so `docker run <image> metrics ...` / `... pca ...` just work.
ENTRYPOINT ["mpath"]
CMD ["--help"]
