Spaces:
Runtime error
Runtime error
srivatsavdamaraju
commited on
Commit
•
3fdcc52
1
Parent(s):
0b927d0
Update Dockerfile
Browse files- Dockerfile +11 -18
Dockerfile
CHANGED
@@ -1,25 +1,18 @@
|
|
1 |
-
|
2 |
-
FROM python:3.9
|
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 |
-
|
|
|
|
|
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
|
19 |
-
RUN pip install
|
20 |
|
21 |
-
#
|
22 |
-
|
23 |
|
24 |
-
# Run the
|
25 |
-
CMD ["gunicorn", "
|
|
|
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"]
|