Bootstrap: docker
From: ubuntu:18.04
%post
    apt -y update
    apt -y install curl git wget
    export CONDA_DIR=/opt/conda
    wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
    /bin/bash ~/miniconda.sh -b -p /opt/conda
    export PATH=$CONDA_DIR/bin:$PATH
    export conda=/Miniconda3/bin/conda
    export bashrc=/root/.bashrc
    git clone https://github.com/lsst/rubin_scheduler.git 
    cd rubin_scheduler
    conda create --channel conda-forge --name rubin --file requirements.txt python=3.11
    $conda init && . $bashrc && conda activate rubin && pip install -e . --no-deps

%environment
    export PATH=$CONDA_DIR/bin:$PATH

