Commit
·
47f3eeb
1
Parent(s):
a639f0f
fix: add libopenblas-dev and libomp-dev for insightface, improve error handling
Browse files- Dockerfile +10 -3
Dockerfile
CHANGED
|
@@ -24,6 +24,8 @@ RUN apt-get update && apt-get install -y \
|
|
| 24 |
libpng-dev \
|
| 25 |
libtiff-dev \
|
| 26 |
libatlas-base-dev \
|
|
|
|
|
|
|
| 27 |
python3-dev \
|
| 28 |
git \
|
| 29 |
build-essential \
|
|
@@ -60,10 +62,15 @@ RUN pip install --no-cache-dir opencv-python-headless
|
|
| 60 |
# Install ONNX Runtime
|
| 61 |
RUN pip install --no-cache-dir onnxruntime==1.17.3
|
| 62 |
|
| 63 |
-
# Install insightface
|
|
|
|
| 64 |
RUN pip install --no-cache-dir insightface==0.7.3 || \
|
| 65 |
-
(pip install --no-cache-dir --upgrade pip && \
|
| 66 |
-
pip install --no-cache-dir --no-build-isolation insightface==0.7.3)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
|
| 68 |
# Install utility dependencies
|
| 69 |
RUN pip install --no-cache-dir \
|
|
|
|
| 24 |
libpng-dev \
|
| 25 |
libtiff-dev \
|
| 26 |
libatlas-base-dev \
|
| 27 |
+
libopenblas-dev \
|
| 28 |
+
libomp-dev \
|
| 29 |
python3-dev \
|
| 30 |
git \
|
| 31 |
build-essential \
|
|
|
|
| 62 |
# Install ONNX Runtime
|
| 63 |
RUN pip install --no-cache-dir onnxruntime==1.17.3
|
| 64 |
|
| 65 |
+
# Install insightface with better error handling
|
| 66 |
+
# Try multiple approaches to handle different failure scenarios
|
| 67 |
RUN pip install --no-cache-dir insightface==0.7.3 || \
|
| 68 |
+
(pip install --no-cache-dir --upgrade pip setuptools wheel && \
|
| 69 |
+
pip install --no-cache-dir --no-build-isolation insightface==0.7.3) || \
|
| 70 |
+
(echo "InsightFace install failed - trying alternative..." && \
|
| 71 |
+
pip install --no-cache-dir --no-build-isolation --no-deps insightface==0.7.3 && \
|
| 72 |
+
pip install --no-cache-dir onnxruntime==1.17.3 numpy==1.24.3 opencv-python-headless) || \
|
| 73 |
+
(echo "InsightFace installation failed. Check logs above for details." && exit 1)
|
| 74 |
|
| 75 |
# Install utility dependencies
|
| 76 |
RUN pip install --no-cache-dir \
|