- Pre-install CPU-only PyTorch to avoid GPU version (saves ~4-5GB)
- Add BUILD_MINERU build arg for optional mineru installation
- Modify pip_install_torch() to default to CPU-only PyTorch
- Update entrypoint to handle CPU-only PyTorch for mineru
- Add comprehensive documentation for CUDA optimizations
Benefits:
- Reduces image size from ~6-8GB to ~2-3GB (60-70% reduction)
- Eliminates massive CUDA package downloads during build/runtime
- Maintains full functionality with CPU processing
- Optional GPU support via GPU_PYTORCH=true environment variable
- Significantly faster build times and reduced bandwidth usage
Fixes: Docker image downloading tons of CUDA packages unnecessarily