# Dockerfile for inspect implementation of the scBench evaluation
# Provides the scientific Python stack for single-cell RNA-seq analysis
# and prerequisites for inspect_swe agents (mini-swe-agent, claude code, codex)

FROM python:3.12-slim

RUN apt-get update && apt-get install -y --no-install-recommends \
    git \
    gcc \
    g++ \
    curl \
    && rm -rf /var/lib/apt/lists/*

# uv — needed by mini_swe_agent to install its wheels at runtime
RUN curl -LsSf https://astral.sh/uv/install.sh | sh \
    && cp /root/.local/bin/uv /usr/local/bin/uv

# Node.js — needed by claude_code and codex_cli agents
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/*

RUN pip install --no-cache-dir \
    scanpy==1.10.4 \
    anndata==0.11.1 \
    h5py==3.12.1 \
    numpy==1.26.4 \
    pandas==2.2.3 \
    scipy==1.14.1 \
    scikit-learn==1.5.2 \
    leidenalg==0.10.2 \
    igraph==0.11.8 \
    umap-learn==0.5.7 \
    huggingface_hub==1.4.1 \
    matplotlib

RUN useradd -m -s /bin/bash agent
USER agent
WORKDIR /home/agent

# Ensure uv is on PATH for the agent user
ENV PATH="/root/.local/bin:/home/agent/.local/bin:${PATH}"
