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

Parallel builds of environments #392

Closed
costrouc opened this issue Oct 14, 2022 · 4 comments
Closed

Parallel builds of environments #392

costrouc opened this issue Oct 14, 2022 · 4 comments

Comments

@costrouc
Copy link
Member

costrouc commented Oct 14, 2022

A conda environment install can be broken into several steps:

  1. solve environment from environment.yaml
  2. download and extract packages to package cache
  3. install conda environment

Currently all of this is done in https://github.com/Quansight/conda-store/blob/main/conda-store-server/conda_store_server/build.py#L97-L110 via conda env create -f environment.yaml -p <prefix> in one monolithic approach. As a first approach (which can be improved later) we need to break this function into several steps.

Replace conda env create -f environment.yaml -p <prefix> with

  1. conda-lock -f environment.yml -p linux-64 this will generate a yaml file for the lock
  2. Python code to inspect the conda lock yaml file (example here) and download each package with manager: conda to the conda package cache directory and extract. This step must use locking using filelock https://github.com/Quansight/conda-store/blob/main/conda-store-server/conda_store_server/build.py#L135-L137.
  3. conda-lock install -p <prefix>
@costrouc
Copy link
Member Author

You can get the package cache directory via the following. This will help determine where packages are downloaded an extracted.

from conda.base.context import context
context.pkgs_dirs

There are two formats that I know of for packages that are downloaded and need to be handled.

@costrouc
Copy link
Member Author

@aktech was there any progress in implementing this? Happy to meet and discuss further if this is still a priority.

@costrouc costrouc assigned anirrudh and unassigned aktech Dec 4, 2022
@costrouc costrouc moved this to 🏗 In progress in Conda-Store Mar 29, 2023
@costrouc costrouc self-assigned this Mar 29, 2023
@costrouc costrouc moved this from 🏗 In progress to ✅ Done in Conda-Store Apr 11, 2023
@costrouc
Copy link
Member Author

Closing as implemented in #417

@costrouc
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants