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

Use conda-lock to create lock files #21

Open
nh13 opened this issue Apr 13, 2022 · 1 comment
Open

Use conda-lock to create lock files #21

nh13 opened this issue Apr 13, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@nh13
Copy link
Member

nh13 commented Apr 13, 2022

See: https://github.com/conda-incubator/conda-lock. We could then support multi-arch lock files.

Possible Implementation

The Solve command would have an option --conda-lock=<arch> that would run:

conda-lock lock -f <env-name>.yaml -p <arch> --lockfile <env-name>-conda-lock.yml
conda-lock render --kind explicit --filename-template <env-name>-<arch>.lock <env-name>-conda-lock.yml

The <env-name>-<arch>.lock would then be parsed so that the URL/hash given for conda packages is stored in the version string in the output YAML, while for pip packages, everything after the # pip <package-name> @.

Then Assemble would generate a <env>-<arch>.lock file instead of a <env>.yaml for <env-name>.build-conda.sh to use. The latter would use conda-lock install --name <env> <env>-<arch>.lock. Does Assemble know it's a conda-lock version if the "version" is a URL, or should we have an explicit option --conda-lock=<arch>? If the latter, must the architecture be encoded in the filename?

Note: both the conda-lock render and install commands use the --mamba option in conda-lock lock, so set those if --mamba given to conda-env-bulider

@nh13 nh13 added the enhancement New feature or request label Apr 13, 2022
@nh13
Copy link
Member Author

nh13 commented Apr 13, 2022

Alternatively, we could have Assemble create a lock file directly, which may be cleaner than having solve create the lock file and shoe horn it into the YAML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant