levalencia commited on
Commit
7499969
·
1 Parent(s): 0a40afa

Refactor Dockerfile to streamline app entry point and update requirements.txt with new dependencies. Remove outdated streamlit_app.py file.

Browse files
Files changed (3) hide show
  1. .streamlit/config.toml +16 -0
  2. Dockerfile +10 -0
  3. src/.DS_Store +0 -0
.streamlit/config.toml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [server]
2
+ enableCORS = false
3
+ enableXsrfProtection = false
4
+
5
+ [browser]
6
+ gatherUsageStats = false
7
+
8
+ [global]
9
+ developmentMode = false
10
+
11
+ [theme]
12
+ primaryColor = "#FF4B4B"
13
+ backgroundColor = "#FFFFFF"
14
+ secondaryBackgroundColor = "#F0F2F6"
15
+ textColor = "#262730"
16
+ font = "sans serif"
Dockerfile CHANGED
@@ -9,11 +9,21 @@ RUN apt-get update && apt-get install -y \
9
  git \
10
  && rm -rf /var/lib/apt/lists/*
11
 
 
 
 
12
  COPY requirements.txt ./
13
  COPY src/ ./src/
 
14
 
15
  RUN pip3 install -r requirements.txt
16
 
 
 
 
 
 
 
17
  EXPOSE 8501
18
 
19
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
 
9
  git \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
+ # Create a non-root user
13
+ RUN useradd -m -u 1000 streamlit
14
+
15
  COPY requirements.txt ./
16
  COPY src/ ./src/
17
+ COPY .streamlit/ ./.streamlit/
18
 
19
  RUN pip3 install -r requirements.txt
20
 
21
+ # Set proper permissions
22
+ RUN chown -R streamlit:streamlit /app
23
+
24
+ # Switch to non-root user
25
+ USER streamlit
26
+
27
  EXPOSE 8501
28
 
29
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
src/.DS_Store ADDED
Binary file (6.15 kB). View file