Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +20 -2
Dockerfile
CHANGED
|
@@ -11,8 +11,26 @@ RUN apt-get update && apt-get install -y \
|
|
| 11 |
|
| 12 |
|
| 13 |
# Set writable path for Streamlit config
|
| 14 |
-
|
| 15 |
-
RUN mkdir -p /
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
COPY requirements.txt ./
|
| 18 |
COPY . .
|
|
|
|
| 11 |
|
| 12 |
|
| 13 |
# Set writable path for Streamlit config
|
| 14 |
+
# ✅ Create a safe config folder
|
| 15 |
+
RUN mkdir -p /app/.streamlit
|
| 16 |
+
|
| 17 |
+
# ✅ Create a minimal Streamlit config to avoid telemetry and file issues
|
| 18 |
+
RUN echo "\
|
| 19 |
+
[general]\n\
|
| 20 |
+
email = \"\"\n\
|
| 21 |
+
\n\
|
| 22 |
+
[server]\n\
|
| 23 |
+
headless = true\n\
|
| 24 |
+
enableCORS = false\n\
|
| 25 |
+
enableXsrfProtection = false\n\
|
| 26 |
+
port = 8501\n\
|
| 27 |
+
\n\
|
| 28 |
+
[theme]\n\
|
| 29 |
+
base = 'light'\n\
|
| 30 |
+
" > /app/.streamlit/config.toml
|
| 31 |
+
|
| 32 |
+
# Set ENV so Streamlit knows where to read config
|
| 33 |
+
ENV STREAMLIT_CONFIG_DIR=/app/.streamlit
|
| 34 |
|
| 35 |
COPY requirements.txt ./
|
| 36 |
COPY . .
|