diff --git a/src/paddle_ocr/Dockerfile.gpu b/src/paddle_ocr/Dockerfile.gpu index 6039933..66573e2 100644 --- a/src/paddle_ocr/Dockerfile.gpu +++ b/src/paddle_ocr/Dockerfile.gpu @@ -45,17 +45,18 @@ COPY wheels/ /tmp/wheels/ COPY requirements-gpu.txt . # Install paddlepaddle: prefer local wheel (ARM64), fallback to CUDA index (x86_64) +# Use python -m pip to ensure packages install to Python 3.11 (not system Python 3.10) RUN if ls /tmp/wheels/paddlepaddle*.whl 1>/dev/null 2>&1; then \ echo "=== Installing PaddlePaddle from local wheel (ARM64) ===" && \ - pip install --no-cache-dir /tmp/wheels/paddlepaddle*.whl; \ + python -m pip install --no-cache-dir /tmp/wheels/paddlepaddle*.whl; \ else \ echo "=== Installing PaddlePaddle from CUDA index (x86_64) ===" && \ - pip install --no-cache-dir paddlepaddle-gpu==3.2.0 -i https://www.paddlepaddle.org.cn/packages/stable/cu126/; \ + python -m pip install --no-cache-dir paddlepaddle-gpu==3.2.0 -i https://www.paddlepaddle.org.cn/packages/stable/cu126/; \ fi && \ rm -rf /tmp/wheels # Install remaining dependencies explicitly -RUN pip install --no-cache-dir \ +RUN python -m pip install --no-cache-dir \ paddleocr==3.3.2 \ jiwer \ numpy \