Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +20 -0
Dockerfile
CHANGED
@@ -8,6 +8,26 @@ USER user
|
|
8 |
ENV PATH="/home/user/.local/bin:$PATH"
|
9 |
|
10 |
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
COPY --chown=user ./requirements.txt requirements.txt
|
13 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
|
|
8 |
ENV PATH="/home/user/.local/bin:$PATH"
|
9 |
|
10 |
WORKDIR /app
|
11 |
+
# Install system dependencies required by OpenCV and other libraries
|
12 |
+
# libgl1-mesa-glx and libglib2.0-0 are common for OpenCV headless
|
13 |
+
# Added more libraries to ensure libGL.so.1 and other dependencies are present
|
14 |
+
RUN apt-get update && \
|
15 |
+
apt-get install -y --no-install-recommends \
|
16 |
+
libgl1-mesa-glx \
|
17 |
+
libgl1 \
|
18 |
+
libglx-mesa0 \
|
19 |
+
libopengl0 \
|
20 |
+
libglib2.0-0 \
|
21 |
+
libsm6 \
|
22 |
+
libxext6 \
|
23 |
+
libxrender-dev \
|
24 |
+
# ffmpeg is useful for video processing if cv2 needs it for certain codecs,
|
25 |
+
# though cv2 often comes with its own ffmpeg bindings.
|
26 |
+
# Add it if you encounter video format issues.
|
27 |
+
# ffmpeg \
|
28 |
+
&& \
|
29 |
+
apt-get clean && \
|
30 |
+
rm -rf /var/lib/apt/lists/*
|
31 |
|
32 |
COPY --chown=user ./requirements.txt requirements.txt
|
33 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|