Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MRG] Remove the conda package cache as we can't hardlink to it #666

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions repo2docker/buildpacks/conda/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,8 @@ def get_assemble_scripts(self):
'${NB_USER}',
r"""
conda env update -p {0} -f "{1}" && \
conda clean -tipsy && \
conda list -p {0} && \
rm -rf /srv/conda/pkgs
conda clean --all -f -y && \
conda list -p {0}
""".format(env_prefix, environment_yml)
))
return super().get_assemble_scripts() + assembly_scripts
Expand Down
5 changes: 4 additions & 1 deletion repo2docker/buildpacks/conda/install-miniconda.bash
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,14 @@ if [[ -f /tmp/kernel-environment.yml ]]; then
fi

# Clean things out!
conda clean -tipsy
conda clean --all -f -y

# Remove the big installer so we don't increase docker image size too much
rm ${INSTALLER_PATH}

# Remove the pip cache created as part of installing miniconda
rm -rf /root/.cache

chown -R $NB_USER:$NB_USER ${CONDA_DIR}

conda list -n root
Expand Down