Skip to content

Commit 3a82a14

Browse files
committed
Conservative cleanup: preserve numpy/torch tests (public APIs depend on them), only remove scipy/pandas/onnx tests
1 parent 0ce2c15 commit 3a82a14

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docker/dockerfiles/Dockerfile.onnx.jetson.6.2.0

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,14 +199,15 @@ RUN ln -sf /usr/bin/python3 /usr/bin/python && \
199199
dist/inference_sdk*.whl \
200200
"setuptools<=75.5.0"
201201

202-
# Remove test directories, development tools, and unnecessary packages to reduce image size (~500MB savings)
202+
# 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
204205
RUN cd /usr/local/lib/python3.10/dist-packages && \
205-
find . -type d -name tests -exec rm -rf {} + 2>/dev/null || true && \
206206
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true && \
207207
rm -rf debugpy* jupyterlab* jupyter_* notebook* ipython* ipykernel* || true && \
208-
rm -rf torch/bin torch/include torch/test || true && \
208+
rm -rf torch/bin torch/include || true && \
209209
rm -rf onnx/backend/test onnx/test || true && \
210+
rm -rf scipy/*/tests pandas/tests || true && \
210211
rm -rf */examples */benchmarks */docs || true && \
211212
rm -rf skimage/data || true && \
212213
find . -name "*.pyi" -delete 2>/dev/null || true

0 commit comments

Comments
 (0)