Satya Karthik R commited on
Commit
389a715
·
1 Parent(s): f2e41c7

docker file added

Browse files
Files changed (1) hide show
  1. dockerfile +30 -0
dockerfile ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Python 3.11 (Stable for AI libraries)
2
+ FROM python:3.11-slim
3
+
4
+ # Set the working directory inside the container
5
+ WORKDIR /app
6
+
7
+ # Install system dependencies required for OpenCV
8
+ # (Even 'headless' OpenCV sometimes needs these basic libs)
9
+ RUN apt-get update && apt-get install -y \
10
+ libglib2.0-0 \
11
+ libsm6 \
12
+ libxext6 \
13
+ libxrender-dev \
14
+ && rm -rf /var/lib/apt/lists/*
15
+
16
+ # Copy requirements first (to cache dependencies)
17
+ COPY requirements.txt .
18
+
19
+ # Install Python dependencies
20
+ RUN pip install --no-cache-dir -r requirements.txt
21
+
22
+ # Copy the rest of your application code
23
+ COPY . .
24
+
25
+ # Expose the port your app runs on
26
+ EXPOSE 5000
27
+
28
+ # Command to run the app using Gunicorn (Production server)
29
+ # "app:app" means "look in app.py for the 'app' variable"
30
+ CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--timeout", "120", "app:app"]