@@ -1,5 +1,33 @@
FROM python:3.12-slim
+# 安装 OpenCV 系统依赖(更完整的列表)
+RUN apt-get update && apt-get install -y \
+ # OpenCV 核心依赖
+ libgl1 \
+ libglib2.0-0 \
+ libsm6 \
+ libxext6 \
+ libxrender1 \
+ # X11 库(OpenCV 需要)
+ libxcb1 \
+ libxcb-shm0 \
+ libxcb-icccm4 \
+ libxcb-image0 \
+ libxcb-keysyms1 \
+ libxcb-randr0 \
+ libxcb-render-util0 \
+ libxcb-render0 \
+ libxcb-shape0 \
+ libxcb-sync1 \
+ libxcb-xfixes0 \
+ libxcb-xinerama0 \
+ libxcb-xkb1 \
+ libxkbcommon-x11-0 \
+ # 其他可能需要的库
+ libfontconfig1 \
+ libfreetype6 \
+ && rm -rf /var/lib/apt/lists/*
+
ENV DEBIAN_FRONTEND=noninteractive \
TZ=Asia/Shanghai