Spaces:
Sleeping
Sleeping
fix streamlit configurations
Browse files- Dockerfile +6 -1
Dockerfile
CHANGED
|
@@ -24,10 +24,15 @@ RUN python download_models.py
|
|
| 24 |
# Copy all application files (excluding .dockerignore patterns)
|
| 25 |
COPY . .
|
| 26 |
|
| 27 |
-
RUN
|
| 28 |
mkdir -p /app/.cache/streamlit && \
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
chmod -R 755 /app/.cache/streamlit
|
| 30 |
|
|
|
|
| 31 |
ENV STREAMLIT_CONFIG_HOME=/app/.streamlit
|
| 32 |
ENV STREAMLIT_USER_BASE_PATH=/app/.cache/streamlit
|
| 33 |
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
|
|
|
|
| 24 |
# Copy all application files (excluding .dockerignore patterns)
|
| 25 |
COPY . .
|
| 26 |
|
| 27 |
+
RUN mkdir -p /app/.streamlit && \
|
| 28 |
mkdir -p /app/.cache/streamlit && \
|
| 29 |
+
printf '[server]\nport = 8501\nheadless = true\nenableCORS = false\nenableXsrfProtection = false\n\n[browser]\ngatherUsageStats = false\n' > /app/.streamlit/config.toml && \
|
| 30 |
+
# mkdir -p /app/.cache/huggingface && \
|
| 31 |
+
# chmod -R 755 /app/.cache/huggingface && \
|
| 32 |
+
chmod -R 755 /app/.streamlit && \
|
| 33 |
chmod -R 755 /app/.cache/streamlit
|
| 34 |
|
| 35 |
+
|
| 36 |
ENV STREAMLIT_CONFIG_HOME=/app/.streamlit
|
| 37 |
ENV STREAMLIT_USER_BASE_PATH=/app/.cache/streamlit
|
| 38 |
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
|