File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -201,16 +201,15 @@ RUN ln -sf /usr/bin/python3 /usr/bin/python && \
201201
202202# Remove test directories, development tools, and unnecessary packages to reduce image size
203203# This happens AFTER all package installations to ensure everything gets cleaned
204- # Note: Keep numpy/torch test dirs (public APIs depend on them), remove from other packages
204+ # Note: Keep numpy/torch test dirs (public APIs depend on them), keep .pyi files (lazy_loader needs them)
205205RUN cd /usr/local/lib/python3.10/dist-packages && \
206206 find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true && \
207207 rm -rf debugpy* jupyterlab* jupyter_* notebook* ipython* ipykernel* || true && \
208208 rm -rf torch/bin torch/include || true && \
209209 rm -rf onnx/backend/test onnx/test || true && \
210210 rm -rf scipy/*/tests pandas/tests || true && \
211211 rm -rf */examples */benchmarks */docs || true && \
212- rm -rf skimage/data || true && \
213- find . -name "*.pyi" -delete 2>/dev/null || true
212+ rm -rf skimage/data || true
214213
215214# Stage 2: Runtime
216215FROM nvcr.io/nvidia/l4t-cuda:12.6.11-runtime
You can’t perform that action at this time.
0 commit comments