fix gpu image python usage
This commit is contained in:
@@ -45,17 +45,18 @@ COPY wheels/ /tmp/wheels/
|
|||||||
COPY requirements-gpu.txt .
|
COPY requirements-gpu.txt .
|
||||||
|
|
||||||
# Install paddlepaddle: prefer local wheel (ARM64), fallback to CUDA index (x86_64)
|
# 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 \
|
RUN if ls /tmp/wheels/paddlepaddle*.whl 1>/dev/null 2>&1; then \
|
||||||
echo "=== Installing PaddlePaddle from local wheel (ARM64) ===" && \
|
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 \
|
else \
|
||||||
echo "=== Installing PaddlePaddle from CUDA index (x86_64) ===" && \
|
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 && \
|
fi && \
|
||||||
rm -rf /tmp/wheels
|
rm -rf /tmp/wheels
|
||||||
|
|
||||||
# Install remaining dependencies explicitly
|
# Install remaining dependencies explicitly
|
||||||
RUN pip install --no-cache-dir \
|
RUN python -m pip install --no-cache-dir \
|
||||||
paddleocr==3.3.2 \
|
paddleocr==3.3.2 \
|
||||||
jiwer \
|
jiwer \
|
||||||
numpy \
|
numpy \
|
||||||
|
|||||||
Reference in New Issue
Block a user