pskeshu commited on
Commit
3de80f2
·
1 Parent(s): abe4b09

fixed docker stuff

Browse files
Files changed (3) hide show
  1. .streamlit/config.toml +9 -12
  2. Dockerfile +8 -0
  3. requirements.txt +3 -1
.streamlit/config.toml CHANGED
@@ -1,14 +1,11 @@
 
 
 
1
  [server]
2
- # Increase file upload size limit for large microscopy images (in MB)
3
- maxUploadSize = 200
4
- # Auto-reload when files change in development
5
- fileWatcherType = "auto"
6
- # Run on specific port
7
- port = 8501
8
 
9
- [theme]
10
- # Optional: Customize app appearance
11
- primaryColor = "#1f77b4"
12
- backgroundColor = "#ffffff"
13
- secondaryBackgroundColor = "#f0f2f6"
14
- textColor = "#262730"
 
1
+ [global]
2
+ dataFrameSerialization = "legacy"
3
+
4
  [server]
5
+ headless = true
6
+ enableCORS = false
7
+ enableXsrfProtection = false
 
 
 
8
 
9
+ [browser]
10
+ gatherUsageStats = false
11
+ EOF < /dev/null
 
 
 
Dockerfile CHANGED
@@ -14,6 +14,10 @@ RUN apt-get update && apt-get install -y \
14
  build-essential \
15
  && rm -rf /var/lib/apt/lists/*
16
 
 
 
 
 
17
  # Copy requirements first for better caching
18
  COPY requirements.txt .
19
 
@@ -23,6 +27,10 @@ RUN pip install --no-cache-dir -r requirements.txt
23
  # Copy the application code
24
  COPY . .
25
 
 
 
 
 
26
  # Expose the port Streamlit runs on
27
  EXPOSE 8501
28
 
 
14
  build-essential \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
+ # Set environment variables for Streamlit
18
+ ENV STREAMLIT_CONFIG_DIR=/app/.streamlit
19
+ ENV STREAMLIT_GLOBAL_CONFIG_DIR=/app/.streamlit
20
+
21
  # Copy requirements first for better caching
22
  COPY requirements.txt .
23
 
 
27
  # Copy the application code
28
  COPY . .
29
 
30
+ # Create streamlit config directory and set permissions
31
+ RUN mkdir -p /app/.streamlit && \
32
+ chmod -R 755 /app/.streamlit
33
+
34
  # Expose the port Streamlit runs on
35
  EXPOSE 8501
36
 
requirements.txt CHANGED
@@ -1,3 +1,5 @@
1
  altair
2
  pandas
3
- streamlit
 
 
 
1
  altair
2
  pandas
3
+ streamlit
4
+ Pillow
5
+ numpy