simran0608 commited on
Commit
47ef030
·
verified ·
1 Parent(s): 00c473d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -2
Dockerfile CHANGED
@@ -11,13 +11,19 @@ RUN apt-get update && apt-get install -y \
11
  libgl1 \
12
  && rm -rf /var/lib/apt/lists/*
13
 
 
 
 
 
 
14
  COPY requirements.txt ./
15
  COPY src/ ./src/
16
 
17
- RUN pip3 install -r requirements.txt
 
18
 
19
  EXPOSE 8501
20
 
21
- HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
22
 
23
  ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
11
  libgl1 \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
+ # Set up writable config directories to fix PermissionError
15
+ RUN mkdir -p /app/.streamlit /app/.config
16
+ ENV HOME=/app
17
+ ENV XDG_CONFIG_HOME=/app/.config
18
+
19
  COPY requirements.txt ./
20
  COPY src/ ./src/
21
 
22
+ # Install Python dependencies
23
+ RUN pip3 install --no-cache-dir -r requirements.txt
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"]