File size: 946 Bytes
15f6f5c
3a6aab5
15f6f5c
3a6aab5
 
 
 
 
 
15f6f5c
 
 
d42f069
 
 
3a6aab5
d42f069
 
 
 
 
3a6aab5
d42f069
 
3a6aab5
15f6f5c
 
3a6aab5
15f6f5c
 
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
FROM docker.io/library/python:3.13.5-slim@sha256:4c2cf9917bd1cbacc5e9b07320025bdb7cdf2df7b0ceaccb55e9dd7e30987419

# Install build dependencies and Git.
RUN apt-get update && apt-get install -y \
    build-essential \
    curl \
    git \
    && rm -rf /var/lib/apt/lists/*

# Set the working directory inside the container.
WORKDIR /app

# Create the .streamlit directory and copy the secrets.toml file from the host.
# This approach avoids permission issues and ensures the folder exists.
RUN mkdir /.streamlit

# Copy the Streamlit configuration files directly into the created directory.
COPY requirements.txt .
COPY src/app.py src/
COPY .streamlit/secrets.toml /.streamlit/secrets.toml
COPY .streamlit/config.toml /.streamlit/config.toml

# Install Python dependencies.
RUN pip install -r requirements.txt

# Expose port 8501 for Streamlit.
EXPOSE 8501

# The command to run the Streamlit application.
CMD ["streamlit", "run", "src/app.py"]