guruthetechie commited on
Commit
dc0c2d6
·
verified ·
1 Parent(s): 211d0c3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -7
Dockerfile CHANGED
@@ -1,15 +1,14 @@
1
  # Use official slim Python image
2
  FROM python:3.11-slim
3
 
4
- # Avoid buffering, useful for logs
5
  ENV PYTHONUNBUFFERED=1
6
 
7
  WORKDIR /app
8
 
9
- # Install system deps required by opencv and pip build tools
10
  RUN apt-get update && apt-get install -y --no-install-recommends \
11
  build-essential \
12
- libgl1-mesa-glx \
13
  libglib2.0-0 \
14
  && rm -rf /var/lib/apt/lists/*
15
 
@@ -21,12 +20,10 @@ RUN pip install -r /app/requirements.txt
21
  # Copy app code
22
  COPY . /app
23
 
24
- # Ensure a logs directory exists
25
  RUN mkdir -p /app/logs
26
 
27
- # Expose the port the app listens on
28
  EXPOSE 5000
29
 
30
- # Run with gunicorn for production
31
- # 'app:app' assumes your Flask file is app.py and Flask app object is named 'app'
32
  CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--workers", "1", "--threads", "4", "app:app"]
 
1
  # Use official slim Python image
2
  FROM python:3.11-slim
3
 
 
4
  ENV PYTHONUNBUFFERED=1
5
 
6
  WORKDIR /app
7
 
8
+ # Install system deps required by opencv & dependencies on Debian 12 (trixie)
9
  RUN apt-get update && apt-get install -y --no-install-recommends \
10
  build-essential \
11
+ libgl1 \
12
  libglib2.0-0 \
13
  && rm -rf /var/lib/apt/lists/*
14
 
 
20
  # Copy app code
21
  COPY . /app
22
 
23
+ # Ensure logs directory exists
24
  RUN mkdir -p /app/logs
25
 
 
26
  EXPOSE 5000
27
 
28
+ # Run with gunicorn
 
29
  CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--workers", "1", "--threads", "4", "app:app"]