PabloVD commited on
Commit
d2d8dd5
·
1 Parent(s): b73925e

Add dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +64 -0
Dockerfile ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python image as base
2
+ FROM python:3.13-slim
3
+
4
+ # Set environment variables to avoid interactive prompts during package installs
5
+ ENV DEBIAN_FRONTEND=noninteractive
6
+
7
+ # Install system dependencies including LaTeX and some fonts for xelatex
8
+ RUN apt-get update && \
9
+ apt-get install -y --no-install-recommends \
10
+ texlive-latex-base \
11
+ texlive-latex-recommended \
12
+ texlive-latex-extra \
13
+ texlive-fonts-recommended \
14
+ texlive-fonts-extra \
15
+ texlive-xetex \
16
+ texlive-science \
17
+ texlive-publishers \
18
+ texlive-plain-generic \
19
+ fonts-freefont-ttf \
20
+ fonts-dejavu \
21
+ fonts-noto \
22
+ fonts-liberation \
23
+ fonts-inconsolata \
24
+ fonts-texgyre \
25
+ build-essential \
26
+ git \
27
+ curl \
28
+ ca-certificates && \
29
+ apt-get clean && \
30
+ rm -rf /var/lib/apt/lists/*
31
+
32
+ # Set up a new user named "user" with user ID 1000
33
+ RUN useradd -m -u 1000 user
34
+
35
+ # Switch to the "user" user
36
+ USER user
37
+
38
+ # Set home to the user's home directory
39
+ ENV HOME=/home/user \
40
+ PATH=/home/user/.local/bin:$PATH
41
+
42
+ # Install the project into `/app`
43
+ WORKDIR $HOME/app
44
+
45
+ # Then, add the rest of the project source code and install it
46
+ # Installing separately from its dependencies allows optimal layer caching
47
+ # Copy all the app code to the docker
48
+ COPY --chown=user . $HOME/app
49
+
50
+ RUN pip uninstall -y langgraph || true
51
+
52
+ # Install Denario app
53
+ RUN pip install git+ttps://github.com/AstroPilot-AI/DenarioApp
54
+
55
+ # This informs Docker that the container will listen on port 5000 at runtime.
56
+ EXPOSE 8501
57
+
58
+ # Touch a .env so it can be shared as a volume (being a single file instead of a folder requires this)
59
+ RUN touch .env
60
+
61
+ # Command to run the app
62
+ HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
63
+
64
+ CMD ["streamlit", "run", "src/app.py", "--server.port=8501", "--server.address=0.0.0.0"]