File size: 1,854 Bytes
d2d8dd5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1096944
 
 
ad74916
d2d8dd5
 
 
 
 
 
 
 
 
 
1096944
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# 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 port 5000 at runtime.
EXPOSE 8501

# 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:8501/_stcore/health

CMD ["streamlit", "run", "DenarioApp/src/app.py", "--server.port=8501", "--server.address=0.0.0.0"]