FROM debian:13
WORKDIR app
COPY . .
RUN apt-get update
RUN apt-get -y install coreutils wget apt-utils

RUN apt-get -y install pip python3-full
RUN apt-get -y install python3-jupyter-core
RUN apt-get -y install python3-ipykernel
RUN apt-get -y install python3-ipython
RUN apt-get -y install make
RUN apt-get -y install which
RUN apt-get autoremove
RUN apt-get clean
RUN apt-get autoclean
RUN rm -rf /var/cache/apt/archives/*
RUN apt-get -y install libopenmpi-dev
RUN apt-get -y install tar
RUN apt-get -y install python3-dev
RUN apt-get -y install lmod
RUN apt-get -y install pandoc
RUN apt-get -y install curl
RUN apt-get -y install git
RUN apt-get autoremove
RUN apt-get clean
RUN apt-get autoclean
RUN rm -rf /var/cache/apt/archives/*
#
RUN mkdir /usr/local/venvs
RUN python3 -m venv /usr/local/venvs/mpnewton
# Installation of hatchling
RUN /usr/local/venvs/mpnewton/bin/pip install --upgrade hatchling
RUN /usr/local/venvs/mpnewton/bin/pip cache purge
# Installation of sphinx
RUN /usr/local/venvs/mpnewton/bin/pip install sphinx
RUN /usr/local/venvs/mpnewton/bin/pip install myst_parser
RUN /usr/local/venvs/mpnewton/bin/pip install sphinx_autodoc_typehints
RUN /usr/local/venvs/mpnewton/bin/pip install nbsphinx
RUN /usr/local/venvs/mpnewton/bin/pip install sphinx_design
RUN /usr/local/venvs/mpnewton/bin/pip install sphinxcontrib_jquery
RUN /usr/local/venvs/mpnewton/bin/pip install sphinx_math_dollar
RUN /usr/local/venvs/mpnewton/bin/pip install sphinx_book_theme
RUN /usr/local/venvs/mpnewton/bin/pip install sphinx-copybutton
RUN /usr/local/venvs/mpnewton/bin/pip install furo
RUN /usr/local/venvs/mpnewton/bin/pip cache purge
# Installation of notebook
RUN /usr/local/venvs/mpnewton/bin/pip install notebook
RUN /usr/local/venvs/mpnewton/bin/pip cache purge
# latest sphinx version instead of older debian's + mpnewton dependencies + packaging/pub dependencies
RUN /usr/local/venvs/mpnewton/bin/pip install --upgrade sphinx==6.2.1 numpy>=2.0 ml_dtypes>=0.5.4 build twine coverage siphash24 pycodestyle
RUN /usr/local/venvs/mpnewton/bin/pip cache purge