Alasil1 commited on
Commit
15f6f5c
·
1 Parent(s): e54420f

Add .streamlit folder and secrets

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -9
Dockerfile CHANGED
@@ -1,20 +1,30 @@
1
- FROM python:3.13.5-slim
2
-
3
- WORKDIR /app
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
  build-essential \
7
  curl \
8
  git \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
- COPY requirements.txt ./
12
- COPY src/ ./src/
 
 
 
 
13
 
14
- RUN pip3 install -r requirements.txt
 
 
15
 
16
- EXPOSE 8501
 
17
 
18
- HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
 
19
 
20
- ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
 
 
1
+ # The base image for the application.
2
+ FROM docker.io/library/python:3.13.5-slim@sha256:4c2cf9917bd1cbacc5e9b07320025bdb7cdf2df7b0ceaccb55e9dd7e30987419
 
3
 
4
+ # Install build dependencies and Git.
5
  RUN apt-get update && apt-get install -y \
6
  build-essential \
7
  curl \
8
  git \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
+ # Set the working directory inside the container.
12
+ WORKDIR /app
13
+
14
+ # Copy the Streamlit configuration files first.
15
+ # This is a critical step to ensure permissions are handled correctly.
16
+ COPY .streamlit/ .streamlit/
17
 
18
+ # Copy the requirements.txt file and install Python dependencies.
19
+ COPY requirements.txt requirements.txt
20
+ RUN pip install -r requirements.txt
21
 
22
+ # Copy all the rest of the files from the current directory into the container's /app directory.
23
+ COPY . .
24
 
25
+ # Expose port 8501 for Streamlit.
26
+ EXPOSE 8501
27
 
28
+ # The command to run the Streamlit application.
29
+ # It uses the file that is located in the `src` subdirectory.
30
+ CMD ["streamlit", "run", "src/app.py"]