Abhinav-kk commited on
Commit
71268c5
·
1 Parent(s): eba95be

Open cv configuration for docker file

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -10
Dockerfile CHANGED
@@ -1,22 +1,23 @@
1
- # Use a compatible Python base image
2
  FROM python:3.9-slim
3
 
4
- # Set environment variables
5
- ENV PYTHONDONTWRITEBYTECODE=1
6
- ENV PYTHONUNBUFFERED=1
 
7
 
8
  # Set the working directory
9
  WORKDIR /app
10
 
11
- # Copy requirements and install dependencies
12
- COPY requirements.txt /app/
13
  RUN pip install --no-cache-dir -r requirements.txt
14
 
15
- # Copy application files
16
- COPY . /app
17
 
18
- # Expose the required port
19
  EXPOSE 7860
20
 
21
- # Run the app with Flask on port 7860
22
  CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"]
 
1
+ # Base image
2
  FROM python:3.9-slim
3
 
4
+ # Install system dependencies
5
+ RUN apt-get update && \
6
+ apt-get install -y libgl1-mesa-glx libglib2.0-0 && \
7
+ rm -rf /var/lib/apt/lists/*
8
 
9
  # Set the working directory
10
  WORKDIR /app
11
 
12
+ # Copy requirements.txt and install dependencies
13
+ COPY requirements.txt .
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
16
+ # Copy the rest of the application code
17
+ COPY . .
18
 
19
+ # Expose port 7860
20
  EXPOSE 7860
21
 
22
+ # Run the app
23
  CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"]