Spaces:
Running
Running
Commit
·
4b7ca80
1
Parent(s):
be8ba6b
Update Dockerfile to install OpenCV system dependencies and change opencv-python to opencv-python-headless in requirements
Browse files- Dockerfile +9 -0
- requirements.txt +1 -1
Dockerfile
CHANGED
@@ -2,6 +2,15 @@ FROM pytorch/pytorch:latest
|
|
2 |
|
3 |
WORKDIR /app
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
COPY . .
|
6 |
|
7 |
RUN pip install -r requirements.txt
|
|
|
2 |
|
3 |
WORKDIR /app
|
4 |
|
5 |
+
# Install system dependencies required by OpenCV
|
6 |
+
RUN apt-get update && apt-get install -y \
|
7 |
+
libglib2.0-0 \
|
8 |
+
libsm6 \
|
9 |
+
libxrender1 \
|
10 |
+
libxext6 \
|
11 |
+
&& apt-get clean \
|
12 |
+
&& rm -rf /var/lib/apt/lists/*
|
13 |
+
|
14 |
COPY . .
|
15 |
|
16 |
RUN pip install -r requirements.txt
|
requirements.txt
CHANGED
@@ -3,7 +3,7 @@ streamlit-drawable-canvas
|
|
3 |
flask
|
4 |
flask-cors
|
5 |
numpy
|
6 |
-
opencv-python
|
7 |
pillow
|
8 |
torch
|
9 |
pandas
|
|
|
3 |
flask
|
4 |
flask-cors
|
5 |
numpy
|
6 |
+
opencv-python-headless
|
7 |
pillow
|
8 |
torch
|
9 |
pandas
|