Yikun commented on code in PR #42253:
URL: https://github.com/apache/spark/pull/42253#discussion_r1280479837


##########
dev/infra/Dockerfile:
##########
@@ -73,3 +74,8 @@ RUN python3.9 -m pip install grpcio protobuf 
googleapis-common-protos grpcio-sta
 # Add torch as a testing dependency for TorchDistributor
 RUN python3.9 -m pip install torch torchvision --index-url 
https://download.pytorch.org/whl/cpu
 RUN python3.9 -m pip install torcheval
+
+# Uninstall unused packages
+RUN $APT_REMOVE libgl1-mesa-dri
+RUN apt-get autoremove --purge -y
+RUN apt-get clean

Review Comment:
   According to 
https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#run
   ```
   Official Debian and Ubuntu images [automatically run apt-get 
clean](https://github.com/moby/moby/blob/03e2923e42446dbb830c654d0eec323a0b4ef02a/contrib/mkimage/debootstrap#L82-L105),
 so explicit invocation is not required.
   ```
   It already be removed. But add `rm -rf /var/lib/apt/lists/*` to the end of 
apt install line might help.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to