processoptimisationsystem commited on
Commit
b4f281f
·
verified ·
1 Parent(s): 7019909

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -18
Dockerfile CHANGED
@@ -2,29 +2,19 @@ FROM python:3.9-slim
2
 
3
  WORKDIR /app
4
 
5
- # Install system dependencies for OpenCV and other libraries
6
- RUN apt-get update && apt-get install -y \
7
- build-essential \
8
- curl \
9
- software-properties-common \
10
- git \
11
- libgl1-mesa-glx \
12
- libx11-6 \
13
- libxext6 \
14
- && rm -rf /var/lib/apt/lists/*
15
 
16
- # Copy application files
17
  COPY requirements.txt ./
18
  COPY src/ ./src/
19
 
20
- # Install Python dependencies
21
  RUN pip3 install --no-cache-dir -r requirements.txt
22
 
23
- # Expose Streamlit port
24
  EXPOSE 8501
25
-
26
- # Healthcheck for Streamlit
27
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
28
-
29
- # Run Streamlit
30
- ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
2
 
3
  WORKDIR /app
4
 
5
+ RUN apt-get update && apt-get install -y libgl1-mesa-glx libx11-6 libxext6 && rm -rf /var/lib/apt/lists/*
6
+
7
+ RUN pip3 install --upgrade pip
8
+
9
+ ENV STREAMLIT_CONFIG_DIR=/app/.streamlit
10
+ ENV MPLCONFIGDIR=/app/.matplotlib
11
+ RUN mkdir -p /app/.streamlit /app/.matplotlib && chmod -R 777 /app/.streamlit /app/.matplotlib
 
 
 
12
 
 
13
  COPY requirements.txt ./
14
  COPY src/ ./src/
15
 
 
16
  RUN pip3 install --no-cache-dir -r requirements.txt
17
 
 
18
  EXPOSE 8501
 
 
19
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
20
+ ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.fileWatcherType=none"]