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

micromamba remove --no-prune is still pruning some files of dependencies #2348

Closed
francesco-ballarin opened this issue Mar 5, 2023 · 1 comment
Labels
type::bug Something isn't working

Comments

@francesco-ballarin
Copy link

Hi,
I am a new user of mamba, and I am trying it out as a temporary workaround for Kaggle/docker-python#1227.

I would like to use mamba to remove a few selected packages (which I am sure I am not using in my application) from an upstream docker image to decrease its disk occupation, yet making minimal changes to the overall environment. Reading the documentation, I thought that the command I was looking for was micromamba remove --no-prune. Still, it seems to remove some files of the dependencies (e.g. METADATA) as well.

Please see below for a reproducible example.

$ docker run -it gcr.io/kaggle-images/python:v129 /bin/bash
root@9a83ee93adc7:/# wget -qO- https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -C ${CONDA_PREFIX} -xvj bin/micromamba
bin/micromamba
root@9a83ee93adc7:/# ls /opt/conda/lib/python3.7/site-packages/zipp-3.11.0.dist-info/
INSTALLER  LICENSE  METADATA  RECORD  REQUESTED  WHEEL  direct_url.json  top_level.txt
root@9a83ee93adc7:/# micromamba remove --yes --no-prune dlenv-tf-2-11-cpu

                                           __
          __  ______ ___  ____ _____ ___  / /_  ____ _
         / / / / __ `__ \/ __ `/ __ `__ \/ __ \/ __ `/
        / /_/ / / / / / / /_/ / / / / / / /_/ / /_/ /
       / .___/_/ /_/ /_/\__,_/_/ /_/ /_/_.___/\__,_/
      /_/

Transaction

  Prefix: /opt/conda

  Removing specs:

   - dlenv-tf-2-11-cpu


  Package                   Version  Build           Channel        Size
──────────────────────────────────────────────────────────────────────────
  Remove:
──────────────────────────────────────────────────────────────────────────

  - dlenv-tf-2-11-cpu  1.0.20230123  py37h8ed1108_0  /tmp/conda      1GB

  Summary:

  Remove: 1 packages

  Total download: 0 B

──────────────────────────────────────────────────────────────────────────



Transaction starting
Unlinking dlenv-tf-2-11-cpu-1.0.20230123-py37h8ed1108_0
Transaction finished
root@9a83ee93adc7:/# ls /opt/conda/lib/python3.7/site-packages/zipp-3.11.0.dist-info/
REQUESTED  direct_url.json

Should I be providing additional command line options?
Thanks!

@jonashaag jonashaag added the type::bug Something isn't working label Mar 5, 2023
@francesco-ballarin
Copy link
Author

After all, I do not believe this is a bug in micromamba itself, but rather in how the dlenv-tf-* package is produced. If this is not the case, feel free to reopen.

@francesco-ballarin francesco-ballarin closed this as not planned Won't fix, can't repro, duplicate, stale Sep 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants