paranox commited on
Commit
d105832
·
verified ·
1 Parent(s): 1528a4a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +33 -12
Dockerfile CHANGED
@@ -1,20 +1,41 @@
1
- FROM python:3.13.5-slim
2
 
3
- WORKDIR /app
4
-
5
- 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 . .
 
 
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", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
1
+ FROM python:3.10-slim
2
 
3
+ # ------------------------------------------------
4
+ # Install system packages required by OpenCV & YOLO
5
+ # ------------------------------------------------
6
+ RUN apt-get update && apt-get install -y --no-install-recommends \
7
  build-essential \
8
+ libglib2.0-0 \
9
+ libsm6 \
10
+ libxext6 \
11
+ libxrender1 \
12
+ libgl1 \
13
+ libopencv-dev \
14
+ python3-opencv \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
+ # ------------------------------------------------
18
+ # App directory
19
+ # ------------------------------------------------
20
+ WORKDIR /app
21
 
22
+ # ------------------------------------------------
23
+ # Install Python deps
24
+ # ------------------------------------------------
25
+ COPY requirements.txt .
26
+ RUN pip install --no-cache-dir -r requirements.txt
27
 
28
+ # ------------------------------------------------
29
+ # Copy all files
30
+ # ------------------------------------------------
31
+ COPY . .
32
 
33
+ # ------------------------------------------------
34
+ # Streamlit settings
35
+ # ------------------------------------------------
36
+ EXPOSE 7860
37
+ ENV STREAMLIT_SERVER_HEADLESS=true
38
+ ENV STREAMLIT_SERVER_PORT=7860
39
+ ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
40
 
41
+ CMD ["streamlit", "run", "app.py"]