Bootstrap: docker
From: ghcr.io/astral-sh/uv:python3.9-bookworm-slim

%files
    /lmb/home/rbedford/Documents/antelop/install_scripts/workflows/cluster_container_config.toml /home/.config/antelop/config.toml
    /lmb/home/rbedford/Documents/antelop/pyproject.toml /antelop/pyproject.toml
    /lmb/home/rbedford/Documents/antelop/MANIFEST.in /antelop/MANIFEST.in
    /lmb/home/rbedford/Documents/antelop/src /antelop/src
    /lmb/home/rbedford/Documents/antelop/uv.lock /antelop/uv.lock
    /lmb/home/rbedford/Documents/antelop/LICENSE /antelop/LICENSE
    /lmb/home/rbedford/Documents/antelop/README.md /antelop/README.md

%environment
    export DJ_SUPPORT_FILEPATH_MANAGEMENT=TRUE
    export ANTELOP_CONFIG_PATH=/home/.config/antelop/config.toml
    export PATH=/antelop/.venv/bin:$PATH
    export IN_CONTAINER=True

%post
    mkdir -p /antelop
    cd /antelop
    rm -rf .venv
    apt-get update
    apt-get install -y build-essential curl software-properties-common unzip git
    rm -rf /var/lib/apt/lists/*
    uv sync --frozen
    #uv pip install tabulate pyarrow dask[dataframe,distributed] probeinterface
    uv run antelop-python

%runscript
    antelop-python

%help
    This container provides an environment for running Antelop's Python-based tools.
    It includes dependencies for data analysis and storage, and is configured for cluster access.

%labels
    Author="Rory Bedford"
    Description="Antelop is a data analysis and storage tool for systems neuroscientists"
    Contact="rbedford@mrc-lmb.cam.ac.uk"
