abdullahsajid commited on
Commit
649ce1c
·
verified ·
1 Parent(s): 1967515

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -20
Dockerfile CHANGED
@@ -1,20 +1,27 @@
1
- # Use an official Python runtime as a parent image
2
- FROM python:3.8-slim
3
-
4
- # Set the working directory in the container
5
- WORKDIR /app
6
-
7
- # Copy the current directory contents into the container at /app
8
- COPY . /app
9
-
10
- # Install any needed packages specified in requirements.txt
11
- RUN pip install --no-cache-dir -r requirements.txt
12
-
13
- # Make port 8080 available to the world outside this container
14
- EXPOSE 8080
15
-
16
- # Define environment variable
17
- ENV FLASK_APP=app.py
18
-
19
- # Run app.py when the container launches
20
- CMD ["flask", "run", "--host=0.0.0.0", "--port=8080"]
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.8-slim
3
+
4
+ # Set the working directory in the container
5
+ WORKDIR /app
6
+
7
+ # Copy the current directory contents into the container at /app
8
+ COPY . /app
9
+
10
+ # Install system dependencies required for OpenCV and other libraries
11
+ RUN apt-get update && \
12
+ apt-get install -y \
13
+ libgl1-mesa-glx \
14
+ libglib2.0-0 \
15
+ && rm -rf /var/lib/apt/lists/*
16
+
17
+ # Install any needed packages specified in requirements.txt
18
+ RUN pip install --no-cache-dir -r requirements.txt
19
+
20
+ # Make port 8080 available to the world outside this container
21
+ EXPOSE 8080
22
+
23
+ # Define environment variable
24
+ ENV FLASK_APP=app.py
25
+
26
+ # Run app.py when the container launches
27
+ CMD ["flask", "run", "--host=0.0.0.0", "--port=8080"]