Spaces:
Running on T4
Running on T4
Commit ·
e8991b2
1
Parent(s): 16b2195
fix: use CPU mode for model pre-download during Docker build
Browse files- Dockerfile +2 -1
Dockerfile
CHANGED
|
@@ -83,8 +83,9 @@ RUN echo "========== STEP 4: Installing Python dependencies ==========" && \
|
|
| 83 |
echo "========== Python dependencies installed =========="
|
| 84 |
|
| 85 |
# Pre-download PaddleOCR-VL-1.5 model at build time (avoids download on first request)
|
|
|
|
| 86 |
RUN echo "========== STEP 5: Pre-downloading PaddleOCR-VL-1.5 model ==========" && \
|
| 87 |
-
python -c "from paddleocr import PaddleOCRVL; PaddleOCRVL()" && \
|
| 88 |
echo "Model cache summary:" && \
|
| 89 |
du -sh /home/user/.cache/paddleocr 2>/dev/null || echo " PaddleOCR cache: (empty)" && \
|
| 90 |
du -sh /home/user/.cache/huggingface 2>/dev/null || echo " HF cache: (empty)" && \
|
|
|
|
| 83 |
echo "========== Python dependencies installed =========="
|
| 84 |
|
| 85 |
# Pre-download PaddleOCR-VL-1.5 model at build time (avoids download on first request)
|
| 86 |
+
# CUDA_VISIBLE_DEVICES="" forces CPU mode since no GPU is available during build
|
| 87 |
RUN echo "========== STEP 5: Pre-downloading PaddleOCR-VL-1.5 model ==========" && \
|
| 88 |
+
CUDA_VISIBLE_DEVICES="" python -c "from paddleocr import PaddleOCRVL; PaddleOCRVL(use_gpu=False)" && \
|
| 89 |
echo "Model cache summary:" && \
|
| 90 |
du -sh /home/user/.cache/paddleocr 2>/dev/null || echo " PaddleOCR cache: (empty)" && \
|
| 91 |
du -sh /home/user/.cache/huggingface 2>/dev/null || echo " HF cache: (empty)" && \
|