Replace `freeze.py` with `conda-lock`
See original GitHub issueProposed change
We use freeze.py to generate fully specified environment.yml
files out of our environment.yml
files. It creates a docker image, installs everything, and then lists out the installed packages.
Instead, we could use conda-lock. This resolves environment.yml
files to fully specified lock files we can use. It doesn’t install the packages either, so should be much faster.
Alternative options
Do nothing! Our current solution works well.
Who would use this feature?
Developers of repo2docker who modify environment.yml
files. Currently the freezing process can take a while - this would make it faster.
How much effort will adding it take?
We need to investigate if conda-lock will actually do what we want. After that, implementing it shouldn’t be too difficult - a couple hours of work for someone very familiar with the codebase, maybe 8-12h for someone who isn’t.
Who can do this work?
- Decent python skills
- A vague understanding of how conda’s environment.yml files work
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (4 by maintainers)
Top GitHub Comments
Hello. First time contributer, saw you mention this on twitter so thought I’d have a look. Feel like I’ve got no idea what I’m doing so help appreciated.
I’ve had a look around freeze.py and conda lock and I think I understand what they both do. This is my current understanding:
freeze.py
- takes environment.yml file and generates environment.*.frozen.yml filesapp.py
- then at main runtime when it usesCondaBuildPack
class it selects the right environment.*.frozen.yml file and runs this as part ofinstall-miniforge.bash
conda create -f conda-system.lock
conda env create -f environment.yml
is run withconda create -f conda-system.lock
install-miniforge.bash
line 42-44:install-miniforge.bash
and then ends up as/tmp/environment.yml
get_build_scripts
function inCondaBuildPack
but I’m not sure.Extra question:
Anyway, that’s all I can come up with for now. I hope I’m on the right track and haven’t got it all completely wrong. Not sure how useful this is. Not sure if I’ve described things in too much detail or not enough, but that’s what I’ve found for now. Hope to come back to this tomorrow.
Actually: no 😛 It still includes the label but nowadays, we don’t remove the main label anymore from a package, we just patch it out of the repodata. Thus this trick really only works with the conda-forge channel.