# Use an official Python image as base FROM python:3.13-slim # Set environment variables to avoid interactive prompts during package installs ENV DEBIAN_FRONTEND=noninteractive # Install system dependencies including LaTeX and some fonts for xelatex RUN apt-get update && \ apt-get install -y --no-install-recommends \ texlive-latex-base \ texlive-latex-recommended \ texlive-latex-extra \ texlive-fonts-recommended \ texlive-fonts-extra \ texlive-xetex \ texlive-science \ texlive-publishers \ texlive-plain-generic \ fonts-freefont-ttf \ fonts-dejavu \ fonts-noto \ fonts-liberation \ fonts-inconsolata \ fonts-texgyre \ build-essential \ git \ curl \ ca-certificates && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* # Set up a new user named "user" with user ID 1000 RUN useradd -m -u 1000 user # Switch to the "user" user USER user # Set home to the user's home directory ENV HOME=/home/user \ PATH=/home/user/.local/bin:$PATH # Install the project into `/app` WORKDIR $HOME/app # Then, add the rest of the project source code and install it # Installing separately from its dependencies allows optimal layer caching # Copy all the app code to the docker COPY --chown=user . $HOME/app RUN pip uninstall -y langgraph || true # Clone and install Denario app RUN git clone https://github.com/AstroPilot-AI/DenarioApp.git RUN pip install DenarioApp/. # This informs Docker that the container will listen on a given port at runtime. EXPOSE 7860 # Touch a .env so it can be shared as a volume (being a single file instead of a folder requires this) RUN touch .env # Command to run the app HEALTHCHECK CMD curl --fail http://localhost:$PORT/_stcore/health CMD ["streamlit", "run", "DenarioApp/src/denario_app/app.py", "--server.port=7860", "--server.address=0.0.0.0", "--", "--deploy"]