suryaprakash01 commited on
Commit
ca6296f
Β·
verified Β·
1 Parent(s): 6fb2b74

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -0
Dockerfile CHANGED
@@ -3,6 +3,9 @@ FROM python:3.9-slim
3
  RUN pip install --upgrade pip
4
  RUN pip install --no-cache-dir torch
5
  RUN pip install opencv-python
 
 
 
6
 
7
  # 1) System deps (OpenCV, etc.)
8
  RUN apt-get update && apt-get install -y \
@@ -14,6 +17,10 @@ RUN apt-get update && apt-get install -y \
14
  ENV STREAMLIT_CONFIG_DIR=/tmp/.streamlit
15
  ENV MPLCONFIGDIR=/tmp/.matplotlib
16
  ENV XDG_CACHE_HOME=/tmp/.cache
 
 
 
 
17
 
18
  # 3) Working dir
19
  WORKDIR /app
 
3
  RUN pip install --upgrade pip
4
  RUN pip install --no-cache-dir torch
5
  RUN pip install opencv-python
6
+ ENV HOME=/tmp
7
+ # Optional: also disable anonymous metrics
8
+ ENV STREAMLIT_DISABLE_METRICS=true
9
 
10
  # 1) System deps (OpenCV, etc.)
11
  RUN apt-get update && apt-get install -y \
 
17
  ENV STREAMLIT_CONFIG_DIR=/tmp/.streamlit
18
  ENV MPLCONFIGDIR=/tmp/.matplotlib
19
  ENV XDG_CACHE_HOME=/tmp/.cache
20
+ # ────────────────────────────────────────────────────────
21
+ # 3) Prepare all config/cache under /tmp (now $HOME)
22
+ # ────────────────────────────────────────────────────────
23
+ RUN mkdir -p /tmp/.streamlit /tmp/.cache /tmp/.matplotlib
24
 
25
  # 3) Working dir
26
  WORKDIR /app