mgbam commited on
Commit
17c8211
·
verified ·
1 Parent(s): caee626

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -1
Dockerfile CHANGED
@@ -1,18 +1,22 @@
1
  FROM python:3.10-slim
2
 
 
3
  ENV HOME=/app
4
  ENV STREAMLIT_CONFIG_DIR=/app/.streamlit
5
 
6
  WORKDIR /app
7
 
 
8
  COPY requirements.txt .
9
  RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
10
 
 
11
  COPY . .
12
 
 
13
  RUN mkdir -p /app/.streamlit && chmod -R 777 /app/.streamlit
14
 
15
- # Add a default Streamlit config.toml (if you don’t already copy it)
16
  RUN echo "\
17
  [server]\n\
18
  headless = true\n\
@@ -20,6 +24,13 @@ port = 8501\n\
20
  address = \"0.0.0.0\"\n\
21
  enableCORS = false\n\
22
  enableXsrfProtection = false\n\
 
 
 
 
 
 
 
23
  " > /app/.streamlit/config.toml
24
 
25
  EXPOSE 8501
 
1
  FROM python:3.10-slim
2
 
3
+ # Set environment variables so Streamlit uses a writable config directory
4
  ENV HOME=/app
5
  ENV STREAMLIT_CONFIG_DIR=/app/.streamlit
6
 
7
  WORKDIR /app
8
 
9
+ # Install dependencies
10
  COPY requirements.txt .
11
  RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
12
 
13
+ # Copy all app code
14
  COPY . .
15
 
16
+ # Create the .streamlit folder and make sure it’s writable by anyone
17
  RUN mkdir -p /app/.streamlit && chmod -R 777 /app/.streamlit
18
 
19
+ # Add a default Streamlit config.toml if you don’t already provide one
20
  RUN echo "\
21
  [server]\n\
22
  headless = true\n\
 
24
  address = \"0.0.0.0\"\n\
25
  enableCORS = false\n\
26
  enableXsrfProtection = false\n\
27
+ \n\
28
+ [theme]\n\
29
+ primaryColor = \"#e63946\"\n\
30
+ backgroundColor = \"#0E1117\"\n\
31
+ secondaryBackgroundColor = \"#1a1a2e\"\n\
32
+ textColor = \"#FAFAFA\"\n\
33
+ font = \"sans serif\"\n\
34
  " > /app/.streamlit/config.toml
35
 
36
  EXPOSE 8501