FROM python:3.11.9-bookworm
RUN apt update && apt install -y build-essential cmake

WORKDIR /usr/src
RUN git clone https://github.com/bayesmix-dev/bayesmix.git
WORKDIR /usr/src/bayesmix/python

ENV PIP_ROOT_USER_ACTION=ignore
ENV PYTHONUNBUFFERED=0
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install .
RUN python -c "from bayesmixpy import build_bayesmix; build_bayesmix()"