Bootstrap: docker
From: nvidia/cuda:12.2.2-devel-ubuntu22.04

%labels
    Author Naga Venkata Sai Chennu
    Version 0.1.0
    Description llm-forge LLM training platform

%post
    apt-get update && apt-get install -y \
        python3.11 \
        python3.11-dev \
        python3.11-venv \
        python3-pip \
        git \
        build-essential \
        && rm -rf /var/lib/apt/lists/*

    update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1
    update-alternatives --install /usr/bin/python python /usr/bin/python3.11 1

    pip3 install --no-cache-dir llm-forge[all]

%environment
    export LC_ALL=C
    export PYTHONUNBUFFERED=1

%runscript
    python3 -m llm_forge.cli "$@"

%help
    llm-forge Singularity container for HPC environments.
    Usage: singularity run --nv llm-forge.sif train --config config.yaml
