Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +6 -3
Dockerfile
CHANGED
|
@@ -10,10 +10,13 @@ COPY . .
|
|
| 10 |
# Install dependencies
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
| 13 |
-
# Create
|
| 14 |
-
RUN mkdir -p /app/.streamlit
|
| 15 |
-
|
| 16 |
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
# Expose the port Streamlit will run on
|
| 19 |
EXPOSE 7860
|
|
|
|
| 10 |
# Install dependencies
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
| 13 |
+
# Create writable .streamlit directory with config
|
| 14 |
+
RUN mkdir -p /app/.streamlit && \
|
| 15 |
+
echo "[server]\nheadless = true\nport = 7860\nenableCORS = false\n" > /app/.streamlit/config.toml
|
| 16 |
|
| 17 |
+
# Set environment variables to force Streamlit to use /app/.streamlit
|
| 18 |
+
ENV STREAMLIT_HOME="/app/.streamlit"
|
| 19 |
+
ENV XDG_CONFIG_HOME="/app"
|
| 20 |
|
| 21 |
# Expose the port Streamlit will run on
|
| 22 |
EXPOSE 7860
|