alamb commented on a change in pull request #9891:
URL: https://github.com/apache/arrow/pull/9891#discussion_r607126662



##########
File path: ci/docker/conda-integration.dockerfile
##########
@@ -25,32 +25,27 @@ ARG node=14
 ARG jdk=8
 ARG go=1.15
 
+# Uninstall unused space-consuming packages
+# (XXX: it would be better not to install them, but they are used by other
+#  builds which are also based on conda-cpp)
+RUN conda uninstall -q clangdev llvmdev valgrind
+
+# Install Archery and integration dependencies
 COPY ci/conda_env_archery.yml /arrow/ci/
 RUN conda install -q \
         --file arrow/ci/conda_env_archery.yml \
         numpy \
         maven=${maven} \
         nodejs=${node} \
         openjdk=${jdk} && \
-    conda clean --all
+    conda clean --all --force-pkgs-dirs
 
-RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
+# Install Rust and remove space-consuming docs
+RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && 
\
+    rm -rf `find /root/.rustup/ -name html -type d`

Review comment:
       @pitrou  
   I wonder if we could try to pass the `--profile=minimal` option to the 
script (docs at https://rust-lang.github.io/rustup/concepts/profiles.html). 
   
   Perhaps something like 
   ```
   curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- 
--profile=minimal -y
   ```
   
   When I ran that command on a local docker image the rust tool chain takes up 
around 400MB: 
   
   ```
   root@46bd64d9d397:/# du -s -h  /root/.rustup/
   411M /root/.rustup/
   ```
   
   Running 
   ```
   curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
   ```
   
   consumes 850MB
   ```
   root@86dbaf9d4c6b:/# du -s -h /root/.rustup 
   865M /root/.rustup
   ```




-- 
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.

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


Reply via email to