Skip to content

Reproducible environments with conda-lock #109

@gpelouze

Description

@gpelouze

Use-case

Using conda-lock would allow us to make environment builds reproducible, instead of solving environments each time we build or release flavors. Will reduce build issues such as #108

Example

Generate a lock file with conda-lock:

$ ls
environment.yaml
$ conda-lock -f environment.yaml -p linux-64
$ ls
conda-lock.yml  environment.yaml

Create an environment from the lock file with mamba (doc)

$ [micro]mamba create --yes -n my-env -f conda-lock.yml

Open questions

How do we generate and update lockfiles? Options:

  • Devs run conda-lock on their machine after changing environment.yaml → repetitive and error-prone
  • GitHub action detects when environment.yaml changed (we already use fkirc/skip-duplicate-actions which can do this) and regenerate lock files automatically → prevents building locally for debugging
  • Script that can run locally + is run in GitHub actions

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions