File size: 768 Bytes
d756239
 
 
 
 
 
 
 
 
 
 
 
 
 
4e28b75
 
 
 
 
d1f7b07
0b5a4b7
 
 
 
 
 
d756239
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Use an official Python runtime as a parent image
FROM python:3.9-slim

# Set the working directory
WORKDIR /app

# Copy the current directory contents into the container at /app
COPY . /app

# Install OpenCV and requests (and any other dependencies)
RUN pip install --no-cache-dir opencv-python requests

# Expose any required ports (if necessary, not for this app specifically)
# EXPOSE 8080
# Install dependencies for OpenCV to work
RUN apt-get update && apt-get install -y \
    libgl1-mesa-glx \
    libglib2.0-0 \
    && rm -rf /var/lib/apt/lists/*


# Copy the requirements file
COPY requirements.txt /app/requirements.txt

# Install the dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Command to run the application
CMD ["python", "app.py"]