Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +12 -0
Dockerfile
CHANGED
|
@@ -1,6 +1,11 @@
|
|
| 1 |
FROM python:3.13.5-slim
|
| 2 |
|
| 3 |
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
RUN apt-get update && apt-get install -y \
|
| 5 |
build-essential \
|
| 6 |
curl \
|
|
@@ -10,9 +15,16 @@ RUN apt-get update && apt-get install -y \
|
|
| 10 |
COPY requirements.txt ./
|
| 11 |
COPY app.py ./
|
| 12 |
COPY utils/ ./utils/
|
|
|
|
| 13 |
|
| 14 |
RUN pip3 install -r requirements.txt
|
| 15 |
|
| 16 |
EXPOSE 8501
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
| 18 |
ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
|
|
|
| 1 |
FROM python:3.13.5-slim
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
+
|
| 5 |
+
# Create necessary directories with proper permissions
|
| 6 |
+
RUN mkdir -p /tmp/streamlit /tmp/matplotlib /tmp/huggingface && \
|
| 7 |
+
chmod 777 /tmp/streamlit /tmp/matplotlib /tmp/huggingface
|
| 8 |
+
|
| 9 |
RUN apt-get update && apt-get install -y \
|
| 10 |
build-essential \
|
| 11 |
curl \
|
|
|
|
| 15 |
COPY requirements.txt ./
|
| 16 |
COPY app.py ./
|
| 17 |
COPY utils/ ./utils/
|
| 18 |
+
COPY .streamlit/ ./.streamlit/
|
| 19 |
|
| 20 |
RUN pip3 install -r requirements.txt
|
| 21 |
|
| 22 |
EXPOSE 8501
|
| 23 |
+
|
| 24 |
+
# Set environment variables for permissions
|
| 25 |
+
ENV STREAMLIT_SERVER_HEADLESS=true
|
| 26 |
+
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
|
| 27 |
+
ENV MPLCONFIGDIR=/tmp/matplotlib
|
| 28 |
+
|
| 29 |
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
| 30 |
ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|