FROM python:3.13-slim

# Install bash and uv
RUN apt-get update && apt-get install -y bash && rm -rf /var/lib/apt/lists/*
RUN pip install --upgrade pip && pip install uv

# Set up working directories
RUN mkdir /work /app
WORKDIR /work

# Create virtual environment in /work and install dependencies
RUN cd /work && uv venv .venv --python=3.13
RUN cd /work; uv pip install \
    awkward \
    numpy \
    pandas \
    hist \
    vector \
    func_adl_servicex_xaodr25 \
    matplotlib \
    mplhep \
    jinja2 \
    servicex_analysis_utils

# Add venv activation to bash profile
RUN echo 'source /work/.venv/bin/activate' >> /etc/bash.bashrc
RUN echo 'export USER=hep-data-llm' >> /etc/bash.bashrc

# Default command is bash
WORKDIR /app
CMD ["bash"]
