Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +10 -2
Dockerfile
CHANGED
|
@@ -8,14 +8,22 @@ RUN apt-get update && apt-get install -y \
|
|
| 8 |
git \
|
| 9 |
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
-
COPY requirements.txt ./
|
| 12 |
COPY src/ ./src/
|
| 13 |
|
| 14 |
RUN pip3 install -r requirements.txt
|
| 15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
EXPOSE 8501
|
| 17 |
|
| 18 |
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
| 19 |
|
|
|
|
|
|
|
|
|
|
| 20 |
ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
| 21 |
-
#Hu
|
|
|
|
| 8 |
git \
|
| 9 |
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
+
COPY requirements.txt ./
|
| 12 |
COPY src/ ./src/
|
| 13 |
|
| 14 |
RUN pip3 install -r requirements.txt
|
| 15 |
|
| 16 |
+
# 🔧 Fix: create writable .streamlit directory
|
| 17 |
+
RUN mkdir -p /app/.streamlit
|
| 18 |
+
|
| 19 |
+
# Copy custom Streamlit config (optional but recommended)
|
| 20 |
+
COPY config.toml /app/.streamlit/config.toml
|
| 21 |
+
|
| 22 |
EXPOSE 8501
|
| 23 |
|
| 24 |
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
| 25 |
|
| 26 |
+
# Tell Streamlit to use /app/.streamlit
|
| 27 |
+
ENV STREAMLIT_CONFIG_DIR=/app/.streamlit
|
| 28 |
+
|
| 29 |
ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
|
|