TheOneHong commited on
Commit
65454e0
·
verified ·
1 Parent(s): 04c5b9c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -4
Dockerfile CHANGED
@@ -22,14 +22,14 @@ RUN pip install paddlepaddle==3.0.0 || \
22
  # 安装基础依赖
23
  RUN pip install transformers gradio Pillow fastapi uvicorn
24
 
25
- # 先降级NumPy以兼容PaddleOCR 3.0,然后安装PaddleOCR
26
- RUN pip install "numpy<2.0" && \
27
  pip install paddleocr==3.0.3 \
28
  && pip uninstall -y opencv-python opencv-contrib-python \
29
- && pip install opencv-python-headless
30
 
31
  # PaddleOCR 3.0额外依赖
32
- RUN pip install shapely pyclipper
33
 
34
  # 创建用户
35
  RUN useradd -m -u 1000 user
 
22
  # 安装基础依赖
23
  RUN pip install transformers gradio Pillow fastapi uvicorn
24
 
25
+ # 先降级NumPy并锁定版本,然后安装PaddleOCR
26
+ RUN pip install "numpy==1.26.4" && \
27
  pip install paddleocr==3.0.3 \
28
  && pip uninstall -y opencv-python opencv-contrib-python \
29
+ && pip install "opencv-python-headless<4.11" "numpy==1.26.4" --force-reinstall
30
 
31
  # PaddleOCR 3.0额外依赖
32
+ RUN pip install shapely pyclipper "numpy==1.26.4" --force-reinstall
33
 
34
  # 创建用户
35
  RUN useradd -m -u 1000 user