Commit
·
9ef67c4
1
Parent(s):
53020db
fix: install ML packages separately and add OpenCV/system dependencies
Browse files- Dockerfile +20 -5
Dockerfile
CHANGED
|
@@ -13,10 +13,22 @@ RUN apt-get update && apt-get install -y \
|
|
| 13 |
libxrender-dev \
|
| 14 |
libgomp1 \
|
| 15 |
libgthread-2.0-0 \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
git \
|
| 17 |
build-essential \
|
| 18 |
gcc \
|
| 19 |
g++ \
|
|
|
|
| 20 |
&& rm -rf /var/lib/apt/lists/*
|
| 21 |
|
| 22 |
# Create user for Hugging Face Spaces (following HF Spaces best practices)
|
|
@@ -41,11 +53,14 @@ RUN pip install --no-cache-dir \
|
|
| 41 |
# Install numpy first (required by other packages)
|
| 42 |
RUN pip install --no-cache-dir numpy==1.24.3
|
| 43 |
|
| 44 |
-
# Install
|
| 45 |
-
RUN pip install --no-cache-dir
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
# Install utility dependencies
|
| 51 |
RUN pip install --no-cache-dir \
|
|
|
|
| 13 |
libxrender-dev \
|
| 14 |
libgomp1 \
|
| 15 |
libgthread-2.0-0 \
|
| 16 |
+
libgtk-3-0 \
|
| 17 |
+
libavcodec-dev \
|
| 18 |
+
libavformat-dev \
|
| 19 |
+
libswscale-dev \
|
| 20 |
+
libv4l-dev \
|
| 21 |
+
libxvidcore-dev \
|
| 22 |
+
libx264-dev \
|
| 23 |
+
libjpeg-dev \
|
| 24 |
+
libpng-dev \
|
| 25 |
+
libtiff-dev \
|
| 26 |
+
libatlas-base-dev \
|
| 27 |
git \
|
| 28 |
build-essential \
|
| 29 |
gcc \
|
| 30 |
g++ \
|
| 31 |
+
cmake \
|
| 32 |
&& rm -rf /var/lib/apt/lists/*
|
| 33 |
|
| 34 |
# Create user for Hugging Face Spaces (following HF Spaces best practices)
|
|
|
|
| 53 |
# Install numpy first (required by other packages)
|
| 54 |
RUN pip install --no-cache-dir numpy==1.24.3
|
| 55 |
|
| 56 |
+
# Install OpenCV first (needed by insightface)
|
| 57 |
+
RUN pip install --no-cache-dir opencv-python-headless
|
| 58 |
+
|
| 59 |
+
# Install ONNX Runtime
|
| 60 |
+
RUN pip install --no-cache-dir onnxruntime==1.17.3
|
| 61 |
+
|
| 62 |
+
# Install insightface (may take longer)
|
| 63 |
+
RUN pip install --no-cache-dir insightface==0.7.3
|
| 64 |
|
| 65 |
# Install utility dependencies
|
| 66 |
RUN pip install --no-cache-dir \
|