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

Reproducible Python virtual environment using uv and nix #1387

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yvan-sraka
Copy link
Contributor

This PR is a draft aimed at producing a reproducible Python virtual environment. uv seems like the right tool for this because it has a lock file mechanism (but we could alternatively use poetry), and nix would be my preferred choice for managing system dependencies (I’m not aware of many alternatives for pinning system dependencies, apart from possibly using a container with a pinned version of Alpine Linux?)

This is still a draft, the shell.nix is currently too convoluted (and ultimately I would like to rather rely on uv2nix), and the goal of this PR is to enable the use of this environment in GitHub Action jobs! Using this setup in CI would help avoid non-reproducible issues, such as this one.

n.b. that VLLM is currently broken on NixOS, debugging its derivation might be necessary at some point: nix-build /nix/var/nix/profiles/per-user/root/channels/nixos/ --run-env -A python3Packages.vllm

@yvan-sraka yvan-sraka requested a review from torymur January 22, 2025 10:50
@yvan-sraka yvan-sraka self-assigned this Jan 22, 2025
@yvan-sraka yvan-sraka force-pushed the reproducibility-with-nix-and-uv branch 2 times, most recently from d5c0359 to 91ca04e Compare January 30, 2025 16:08
@yvan-sraka yvan-sraka marked this pull request as ready for review January 30, 2025 16:08
@yvan-sraka yvan-sraka requested a review from rlouf January 30, 2025 16: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.

1 participant