Spaces:
Sleeping
Sleeping
Commit
·
6bd2bc0
1
Parent(s):
1c8e6d1
Fix Dockerfile: remove software-properties-common, add OpenCV dependencies
Browse files- Dockerfile +7 -10
- packages.txt +9 -0
Dockerfile
CHANGED
|
@@ -4,16 +4,13 @@ FROM python:3.9-slim
|
|
| 4 |
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
#
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
# Copy requirements first for better caching
|
| 16 |
-
COPY requirements.txt .
|
| 17 |
|
| 18 |
# Install Python dependencies
|
| 19 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
| 4 |
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Copy package list and requirements first for better caching
|
| 8 |
+
COPY packages.txt requirements.txt ./
|
| 9 |
+
|
| 10 |
+
# Install system dependencies from packages.txt
|
| 11 |
+
RUN apt-get update && \
|
| 12 |
+
xargs -r -a packages.txt apt-get install -y && \
|
| 13 |
+
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
# Install Python dependencies
|
| 16 |
RUN pip install --no-cache-dir -r requirements.txt
|
packages.txt
CHANGED
|
@@ -1,3 +1,12 @@
|
|
| 1 |
build-essential
|
| 2 |
curl
|
| 3 |
git
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
build-essential
|
| 2 |
curl
|
| 3 |
git
|
| 4 |
+
libgl1-mesa-glx
|
| 5 |
+
libglib2.0-0
|
| 6 |
+
libgomp1
|
| 7 |
+
libsm6
|
| 8 |
+
libxext6
|
| 9 |
+
libxrender-dev
|
| 10 |
+
libfontconfig1
|
| 11 |
+
libice6
|
| 12 |
+
wget
|