-
Notifications
You must be signed in to change notification settings - Fork 107
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
conda-lock install ignores envs_dirs #777
Comments
Reproducer: FROM quay.io/jupyter/base-notebook:2025-02-20
RUN mamba install -y git pipx
RUN echo "export PATH=\"/home/jovyan/.local/bin:\$PATH\"" >> ~/.bashrc
RUN pipx install --force 'git+https://github.com/conda/conda-lock@v2.5.7'
RUN conda config --append envs_dirs '~/.conda'
RUN cat <<EOF > environment.yml
name: ficc
channels:
- conda-forge
- nodefaults
dependencies:
- tzcode
platforms:
- linux-64
EOF
RUN ~/.local/bin/conda-lock lock docker build . -t cl777
docker run --rm -it cl777 /bin/bash
conda-lock install -n ficc
conda-lock install -n ficc It appears that the prefix |
Another reproducer not involving conda-lock: FROM quay.io/jupyter/base-notebook:2025-02-20
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 conda config --append envs_dirs '~/.conda' docker build . -t cl777-nocl
docker run --rm -it cl777-nocl /bin/bash
mamba create --file explicit.txt --yes --name ficc
mamba create --file explicit.txt --yes --name ficc Looking into workarounds... |
Here's a simple workaround with docker run --rm -it cl777 /bin/bash
conda-lock install -n ficc --no-mamba |
Another simple workaround: MAMBA_ROOT_PREFIX=~/.conda conda-lock install -n ficc |
An even simpler workaround 😂 mkdir ~/.conda
conda-lock install -n ficc |
Reported upstream in mamba-org/mamba#3836 |
Thank you for tracking this down, reporting upstream, and providing the workaround, super helpful! I've applied the workaround in our environment and can report back if I see anything unexpected, but will close this for now. Thanks so much again! |
Checklist
What happened?
conda-lock install -n ...
invocations sometimes fail to honor theenvs_dirs
configuration:However, this does not reproduce reliably.
In fact, it often does the right thing after immediately retrying the exact same invocation:
Any ideas of how to work around this and/or debug it would be greatly appreciated.
Additional Context
The text was updated successfully, but these errors were encountered: