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 create not idempotent when envs_dirs does not exist #3836

Open
3 tasks done
maresb opened this issue Feb 20, 2025 · 1 comment · May be fixed by #3796
Open
3 tasks done

micromamba create not idempotent when envs_dirs does not exist #3836

maresb opened this issue Feb 20, 2025 · 1 comment · May be fixed by #3796
Labels
type::bug Something isn't working

Comments

@maresb
Copy link
Contributor

maresb commented Feb 20, 2025

Troubleshooting docs

  • My problem is not solved in the Troubleshooting docs

Anaconda default channels

  • I do NOT use the Anaconda default channels (pkgs/* etc.)

How did you install Mamba?

Other (please describe)

Search tried in issue tracker

envs_dirs

Latest version of Mamba

  • My problem is not solved with the latest version

Tried in Conda?

I do not have this problem with Conda, just with Mamba

Describe your issue

This issue seems to overlap with #3790. I have not checked if this is solved by either of the two PRs linked there.

To reproduce,

FROM mambaorg/micromamba:2.0.5

RUN cat <<EOF > explicit.txt
# Generated by conda-lock.
# platform: linux-64
# input_hash: ab45cd56a12b42dab7d2e540f01585dd1d1f8a7b51e43009d3475f75794137ad
@EXPLICIT
https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2#d7c89558ba9fa0495403155b64376d81
https://conda.anaconda.org/conda-forge/linux-64/libgomp-14.2.0-h77fa898_1.conda#cc3573974587f12dda90d96e3e55a702
https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2#73aaf86a425cc6e73fcf236a5a46396d
https://conda.anaconda.org/conda-forge/linux-64/libgcc-14.2.0-h77fa898_1.conda#3cb76c3f10d3bc7f1105b2fc9db984df
https://conda.anaconda.org/conda-forge/linux-64/tzcode-2025a-hb9d3cd8_0.conda#e18bdeebf29176790089b654cfedaaec
EOF

RUN cat <<EOF > ~/.condarc
envs_dirs:
- ~/.conda
EOF
docker build . -t cl777-mm
docker run --rm -it cl777-mm
micromamba create --file explicit.txt --yes --name ficc
micromamba create --file explicit.txt --yes --name ficc

The first create command installs into the prefix $MAMBA_ROOT_PREFIX/envs/ficc = /opt/conda/envs/ficc.

The second (and any subsequent) create command installs into the envs_dirs prefix ~/.conda/ficc.

I expected this micromamba create command to be idempotent. After some investigation, I believe what's happening on the two successive micromamba create commands is:

  1. a. Micromamba sees that ~/.conda from envs_dirs doesn't exist, so installs in $MAMBA_ROOT_PREFIX/envs/ficc = /opt/conda/envs/ficc.
    b. Micromamba creates ~/.conda/environments.txt.
  2. Micromamba sees that ~/.conda now exists and installs in the prefix ~/.conda/ficc.

mamba info / micromamba info

~/.condarc

envs_dirs:
- ~/.conda
@jjerphan
Copy link
Member

#3796 likely fixes it.

@jjerphan jjerphan added the type::bug Something isn't working label Feb 20, 2025
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

Successfully merging a pull request may close this issue.

2 participants