Commit ·
71268c5
1
Parent(s): eba95be
Open cv configuration for docker file
Browse files- Dockerfile +11 -10
Dockerfile
CHANGED
|
@@ -1,22 +1,23 @@
|
|
| 1 |
-
#
|
| 2 |
FROM python:3.9-slim
|
| 3 |
|
| 4 |
-
#
|
| 5 |
-
|
| 6 |
-
|
|
|
|
| 7 |
|
| 8 |
# Set the working directory
|
| 9 |
WORKDIR /app
|
| 10 |
|
| 11 |
-
# Copy requirements and install dependencies
|
| 12 |
-
COPY requirements.txt
|
| 13 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
| 15 |
-
# Copy application
|
| 16 |
-
COPY .
|
| 17 |
|
| 18 |
-
# Expose
|
| 19 |
EXPOSE 7860
|
| 20 |
|
| 21 |
-
# Run the app
|
| 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"]
|