maham234 commited on
Commit
2c1450e
·
verified ·
1 Parent(s): c8438bd

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -8
Dockerfile CHANGED
@@ -1,25 +1,28 @@
1
- FROM python:3.10-slim
 
2
 
3
- # Install system dependencies for OpenCV + MediaPipe
4
  RUN apt-get update && apt-get install -y \
5
- libgl1 \
6
  libglib2.0-0 \
7
- build-essential \
8
  ffmpeg \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
  # Set working directory
12
  WORKDIR /app
13
 
14
- # Copy requirements and install
15
  COPY requirements.txt .
 
 
16
  RUN pip install --no-cache-dir -r requirements.txt
17
 
18
- # Copy app files
19
  COPY . .
20
 
21
- # Expose port for Flask
22
  EXPOSE 5000
23
 
24
- # Start Flask using Gunicorn (production server)
25
  CMD ["gunicorn", "app:app", "-b", "0.0.0.0:5000", "--workers=1", "--threads=2"]
 
1
+ # Base image
2
+ FROM python:3.10
3
 
4
+ # Install required system libraries for OpenCV & MediaPipe
5
  RUN apt-get update && apt-get install -y \
6
+ libgl1-mesa-glx \
7
  libglib2.0-0 \
8
+ libopencv-dev \
9
  ffmpeg \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
  # Set working directory
13
  WORKDIR /app
14
 
15
+ # Copy dependency file
16
  COPY requirements.txt .
17
+
18
+ # Install Python dependencies
19
  RUN pip install --no-cache-dir -r requirements.txt
20
 
21
+ # Copy app source
22
  COPY . .
23
 
24
+ # Expose Flask port
25
  EXPOSE 5000
26
 
27
+ # Start Flask app using Gunicorn
28
  CMD ["gunicorn", "app:app", "-b", "0.0.0.0:5000", "--workers=1", "--threads=2"]