ysif9 commited on
Commit
42e57f6
·
verified ·
1 Parent(s): c483519

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -4
Dockerfile CHANGED
@@ -6,15 +6,24 @@ RUN apt-get update && apt-get install -y \
6
  build-essential \
7
  curl \
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"]
 
6
  build-essential \
7
  curl \
8
  git \
9
+ && rm -rf /var/lib/apt/lists/*
10
 
11
  COPY requirements.txt ./
12
+ RUN pip3 install --no-cache-dir -r requirements.txt
13
+
14
+ # Ensure writable Streamlit paths and disable telemetry
15
+ ENV STREAMLIT_HOME=/app/.streamlit \
16
+ STREAMLIT_CACHE_DIR=/app/.streamlit/cache \
17
+ STREAMLIT_USER_PATH=/app/.streamlit \
18
+ STREAMLIT_DISABLE_TELEMETRY=1 \
19
+ PYTHONUNBUFFERED=1
20
 
21
+ RUN mkdir -p /app/.streamlit/cache
22
+
23
+ COPY src/ ./src/
24
 
25
  EXPOSE 8501
26
 
27
+ HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
28
 
29
  ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]