Skip to content
Snippets Groups Projects
Select Git revision
  • master
1 result

conda_clean_base.sh

Blame
  • Carine's avatar
    Carine Rey authored
    a2bc3056
    History
    conda_clean_base.sh 866 B
    #!/usr/bin/bash -eu
    
    # clean default conda environment (only keep the bare minimum)
    find /home/rstudio/.conda/ -name '*.a' -delete && \
    find /home/rstudio/.conda/ -name '__pycache__' -type d -exec rm -rf '{}' '+' && \
    find /home/rstudio/.conda/ -mindepth 1 -maxdepth 1 -type d \( -name "bin" -o -name "lib" -o -name "etc" \) -prune -o -exec rm -rf '{}' '+' && \
    find /home/rstudio/.conda/bin -type f -size +100k ! -name "python3.10" -delete && \
    find /home/rstudio/.conda/lib/ -mindepth 1 -maxdepth 1 -type d ! -name "python3.10" -exec rm -rf '{}' '+' && \
    rm -rf /home/rstudio/.conda/lib/python3.10/site-packages/pip /home/rstudio/.conda/lib/python3.10/idlelib /home/rstudio/.conda/lib/python3.10/ensurepip && \
    find /home/rstudio/.conda/lib/python3.10/site-packages -name '*.pyx' -delete && \
    rm -rf /home/rstudio/.conda/lib/python3.10/site-packages/uvloop/loop.c