# Use the micromamba as base image
FROM python:3.10-slim-bookworm

LABEL maintainer="GammaLearn https://purl.org/gammalearn"

RUN apt-get update && apt upgrade -y && apt-get install -y git git-lfs wget && apt-get clean && apt autoremove -y


# Install package in base environment using pip
COPY . /opt/stereograph

# torch is pinned to the cu128 build: unpinned, pip pulls the latest torch (cu13), which needs a newer driver than the GPU nodes have
RUN  pip install --upgrade pip && pip install --no-cache-dir --extra-index-url https://download.pytorch.org/whl/cu128 torch==2.10.0+cu128 torchvision==0.25.0+cu128 && pip install --no-cache-dir /opt/stereograph[ctapipe_v19]



