mamba icon indicating copy to clipboard operation
mamba copied to clipboard

Handle multiple package cache and envs dirs

Open adriendelsalle opened this issue 4 years ago • 2 comments

Description

libmamba currently only consider root_prefix for packages cache and envs/ directory when using a named environment. We should be able to support multiple cache and env dirs, and make them configurable from rc files using pkg_dirs and envs_dirs.

The notion of root_prefix maybe also has to be modified in multiple places to be sure the root_prefix is a read-only source. I think about some places like: https://github.com/mamba-org/mamba/blob/ceb85460fd22f6cb2e7446622b655dff7036718a/src/core/channel.cpp#L62

adriendelsalle avatar Aug 03 '21 17:08 adriendelsalle

I still didn't have implemented multiple envs dirs, only multiple caches

adriendelsalle avatar Oct 18 '21 06:10 adriendelsalle

@adriendelsalle, @wolfv

Is there any plan to support envs_dirs in the configuration file for micromamba? Details of the issues are available in #1999. Personally I'm not much interested in multiple directories, but having control over the location is required for our particular use case of managing backup of Kubeflow notebooks.

yarnabrina avatar Oct 27 '22 08:10 yarnabrina

I've ended up here after discovering that micromamba appeared to be ignoring my envs_dirs config.

I just have one env dir, but I'd like to be able to change it from the default of $ROOT_PROFIX/envs

dhirschfeld avatar Nov 03 '22 00:11 dhirschfeld

sorry for the late reply, looks like envs_dirs config is set after env_name:

trace    libmamba Compute configurable 'env_name'
trace    libmamba Compute configurable 'envs_dirs'

a dependency should be added

the hook also looks like incorrect: https://github.com/mamba-org/mamba/blob/ab22b6398533bcbd01f7642f7921636facbb6cfa/libmamba/src/api/configuration.cpp#L456 it should probably pick the first writable envs dir provided

adriendelsalle avatar Nov 13 '22 21:11 adriendelsalle