Commit
·
6ee66f7
1
Parent(s):
02f88ee
Fix ONNX Runtime installation: try latest version first, add better error handling
Browse files- Dockerfile +12 -7
Dockerfile
CHANGED
|
@@ -71,13 +71,18 @@ RUN pip install --no-cache-dir \
|
|
| 71 |
# Install OpenCV first (needed by insightface)
|
| 72 |
RUN pip install --no-cache-dir opencv-python-headless
|
| 73 |
|
| 74 |
-
# Install ONNX Runtime - try CPU version first as it's more compatible
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
|
| 82 |
# Install moviepy after other dependencies
|
| 83 |
RUN pip install --no-cache-dir moviepy==1.0.3
|
|
|
|
| 71 |
# Install OpenCV first (needed by insightface)
|
| 72 |
RUN pip install --no-cache-dir opencv-python-headless
|
| 73 |
|
| 74 |
+
# Install ONNX Runtime - try CPU version first as it's more compatible and doesn't require GPU
|
| 75 |
+
# Try newer versions first as they're more likely to have wheels available
|
| 76 |
+
RUN pip install --no-cache-dir onnxruntime-cpu || \
|
| 77 |
+
pip install --no-cache-dir "onnxruntime-cpu>=1.16.0" || \
|
| 78 |
+
pip install --no-cache-dir onnxruntime-cpu==1.17.3 || \
|
| 79 |
+
pip install --no-cache-dir onnxruntime==1.17.3 || \
|
| 80 |
+
pip install --no-cache-dir "onnxruntime>=1.16.0" || \
|
| 81 |
+
(echo "ERROR: All ONNX Runtime installation attempts failed" && exit 1)
|
| 82 |
+
|
| 83 |
+
# Verify ONNX Runtime installation
|
| 84 |
+
RUN python -c "import onnxruntime; print('ONNX Runtime version:', onnxruntime.__version__)" || \
|
| 85 |
+
(echo "ERROR: ONNX Runtime installation verification failed" && exit 1)
|
| 86 |
|
| 87 |
# Install moviepy after other dependencies
|
| 88 |
RUN pip install --no-cache-dir moviepy==1.0.3
|