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

Lock conda dependency versions #19

Merged
merged 5 commits into from
Jun 1, 2022
Merged

Lock conda dependency versions #19

merged 5 commits into from
Jun 1, 2022

Conversation

weiji14
Copy link
Member

@weiji14 weiji14 commented May 24, 2022

Ensure reproducibility of the software environment. Created using mamba list --explicit > environment-linux-64.lock.

We actually have a pip-only dependency lazrs, so I might try using conda-lock's new toml lockfile format to get it 100% reproducible.

Note: Might need to uninstall lazrs and clear poetry's cache according to python-poetry/poetry#4679 in order to prevent RuntimeError: Unable to find installation candidates for lazrs (0.4.0). Specifically, do:

pip uninstall lazrs
poetry cache clear --all pypi
rm -rf ~/.cache/pypoetry/
rm -rf ~/.cache/pip/
conda-lock -f environment.yml

Edit: Still not working because lazrs doesn't have an sdist 😅, Ref: python-poetry/poetry#5574 Edit2: lazrs==0.4.3 now has an sdist so conda-lock works, ref: laz-rs/laz-rs-python#13

Created using `mamba list --explicit > environment-linux-64.lock`.
Create lockfile using `conda-lock -f environment.yml -p linux-64`
conda-lock.yml Outdated Show resolved Hide resolved
Comment on lines +21 to +22
platforms:
- linux-64
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debating on whether to have a Linux only lockfile, or do macOS and Windows as well 🙃

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH I think linux only is fine since that's what we used to deploy the book.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On second thought, let's just lock it. It adds like 9000+ lines to the conda-lock.yml file but at least macOS and Windows users can reproduce the environment fully too.

conda-lock.yml Outdated Show resolved Hide resolved
@weiji14 weiji14 marked this pull request as ready for review June 1, 2022 14:01
conda-lock.yml Outdated Show resolved Hide resolved
@weiji14 weiji14 merged commit 9a5a76c into main Jun 1, 2022
@weiji14 weiji14 deleted the conda/lock branch June 1, 2022 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants