Repository navigation
fix(docker): use a CPU-only PyTorch image - #17
rksharma-owg wants to merge 1 commit into
Conversation
Avoid pulling CUDA runtime dependencies for the CPU-only app container, and rely on the separate Ollama service instead of launching a nonexistent embedded daemon. Stabilize lint CI across Ruff releases and add packaging regression tests.\n\nCloses OWASP#6
|
I pulled PR #17's branch and independently validated the Dockerfile changes locally (macOS, Apple Silicon, Docker Desktop, Python 3.11.15). Build result: docker build -t pwnzzai-local:dev . Build completed successfully (12/12 steps, no errors). Resulting image content size: 954MB, down from the previously published 6.11GB manifest (~84% smaller) — consistent with the PR's reported 87.3% reduction. Regression tests: tests/unit/test_dockerfile.py::test_docker_image_installs_cpu_only_torch_before_app_requirements PASSED What the fix does:
Caveat: I validated the build and image size locally but haven't reproduced the original repro steps (pulling a published image on Windows) to directly confirm the EOF-on-pull error is resolved. Given the ~84% size reduction, this is very likely to fix it, but a Windows pull test against a registry-published build from this branch would fully close the loop. |
Unpinned CPU torch resolved to 2.13.0+cpu and grew the image ~250 MB versus 2.7.1. Pinning 2.7.1 keeps a known CPU wheel and matches the pin already reviewed on OWASP PR OWASP#17. Still not pinned in requirements.txt, so local venvs keep resolving their own torch. Co-authored-by: Cursor <cursoragent@cursor.com>
Unpinned CPU torch resolved to 2.13.0+cpu and grew the image ~250 MB versus 2.7.1. The pin to 2.7.1 (CPU index, Dockerfile only) was borrowed from OWASP#17; requirements.txt stays unpinned so host venvs keep resolving their own torch. Co-authored-by: Cursor <cursoragent@cursor.com>
Unpinned CPU torch resolved to 2.13.0+cpu and grew the image ~250 MB versus 2.7.1. The pin to 2.7.1 (CPU index, Dockerfile only) was borrowed from OWASP#17; requirements.txt stays unpinned so host venvs keep resolving their own torch.
|
Closing as superseded by #22, which merged the CPU-only PyTorch and Flask-only container changes along with broader image/CI improvements. This branch now conflicts with |

Summary
Fixes #6.
Validation
AI assistance
OpenAI Codex assisted with the audit, implementation, tests, and PR description. I reviewed the complete diff and validation results.