FROM coqorg/coq:8.16.1

USER coq

COPY --chown=coq . .

RUN opam init -y && opam update

# Install Coq packages.
# RUN opam pin add coq 8.16.1 -y
RUN opam pin add coq-itree 5.1.0 -y

# Install dependencies for building the python sampling package.
RUN opam pin add pythonlib v0.15.1 -y

# Set up python analysis scripts.
RUN sudo apt-get update && sudo apt-get install -y nano python3-pip
RUN pip install numpy==1.24.2 scipy==1.10.1 tensorflow==2.11.0 optas==1.0.3

RUN cd python/xar/ocaml && dune build xarpy.so && cd .. && make install && cd .. && cd ..

# CMD ["make", "-j4"]
