srivatsavdamaraju commited on
Commit
3fdcc52
1 Parent(s): 0b927d0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -18
Dockerfile CHANGED
@@ -1,25 +1,18 @@
1
- # Use an official Python runtime as a parent image
2
- FROM python:3.9-slim
3
-
4
- # Install system dependencies for OpenCV (including libGL.so.1)
5
- RUN apt-get update && apt-get install -y \
6
- libgl1-mesa-glx \
7
- && rm -rf /var/lib/apt/lists/*
8
 
9
  # Set the working directory in the container
10
- WORKDIR /app
 
 
11
 
12
- # Copy the current directory contents into the container at /app
13
- COPY . /app
14
 
15
- # Install any needed packages specified in requirements.txt
16
- RUN pip install --no-cache-dir -r requirements.txt
17
 
18
- # Install Gunicorn
19
- RUN pip install gunicorn
20
 
21
- # Expose the port the app runs on
22
- EXPOSE 5000
23
 
24
- # Run the Gunicorn server when the container launches
25
- CMD ["gunicorn", "--bind", "0.0.0.0:5000", "app:app"]
 
1
+ ## Use the official Python image
2
+ FROM python:3.9
 
 
 
 
 
3
 
4
  # Set the working directory in the container
5
+ # Copy the requirements file into the container
6
+ COPY requirements.txt ./requirements.txt
7
+
8
 
 
 
9
 
 
 
10
 
11
+ # Install Python packages from requirements.txt
12
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
13
 
14
+ # Copy the current directory contents into the container
15
+ COPY . .
16
 
17
+ # Run the application using gunicorn with eventlet worker
18
+ CMD ["gunicorn", "-k", "eventlet", "-b", "0.0.0.0:7860", "app:app"]