-
Notifications
You must be signed in to change notification settings - Fork 4
feat: Use locked Pixi environment for Binder deployment #110
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR modernizes the Binder deployment by using a locked Pixi environment instead of manually maintained requirements files. It installs Pixi during the Binder build and exports a conda explicit spec from the Pixi workspace to ensure environment reproducibility. The changes also update Python to 3.13 and consolidate dependency management.
Key changes:
- Adds
jqas a conda dependency inpixi.toml(previously inbinder/apt.txt) - Implements a new Binder build approach using Pixi workspace export to conda explicit spec
- Updates
book/requirements.txtwith current dependency versions for pip/uv users
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| pixi.toml | Added jq as a dependency to replace the apt package |
| pixi.lock | Lock file updates for jq and its dependency oniguruma across all platforms |
| book/requirements.txt | Updated from minimal jupyter-book spec to full dependency list for pip users |
| book/introduction.md | Updated documentation to reference book/requirements.txt instead of binder/requirements.txt |
| binder/runtime.txt | Updated Python version from 3.12 to 3.13 |
| binder/requirements.txt | Removed (dependencies now managed through Pixi) |
| binder/postBuild | Replaced ROOT installation with Pixi-based workflow |
| binder/apt.txt | Removed (jq now installed via conda) |
Comments suppressed due to low confidence (1)
binder/postBuild:6
- Installing Pixi via curl in the postBuild script introduces a potential security risk and build reproducibility concern. The script downloads and executes code without verification. Consider:
- Pinning to a specific Pixi version
- Verifying the checksum of the downloaded installer
- Or pre-installing Pixi in the base Binder image if possible
curl -fsSL https://pixi.sh/install.sh | sh
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| echo 'eval "$(pixi completion --shell bash)"' >> ~/.bashrc | ||
| . ~/.bashrc | ||
| # Sourcing ~/.bashrc doesn't seem to pick up changes, so manually set PATH | ||
| export PATH="~/.pixi/bin:${PATH}" |
Copilot
AI
Dec 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tilde (~) in the PATH export will not expand to the home directory because it's inside double quotes. This should use $HOME instead:
export PATH="$HOME/.pixi/bin:${PATH}"| export PATH="~/.pixi/bin:${PATH}" | |
| export PATH="$HOME/.pixi/bin:${PATH}" |
| . ~/.bashrc | ||
| # Sourcing ~/.bashrc doesn't seem to pick up changes, so manually set PATH | ||
| export PATH="~/.pixi/bin:${PATH}" | ||
|
|
Copilot
AI
Dec 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sourcing ~/.bashrc won't work reliably in non-interactive scripts. The Pixi installation typically modifies .bashrc for interactive shells only. Consider using the Pixi binary path directly by setting the PATH immediately after installation without relying on shell configuration files.
| . ~/.bashrc | |
| # Sourcing ~/.bashrc doesn't seem to pick up changes, so manually set PATH | |
| export PATH="~/.pixi/bin:${PATH}" | |
| # Removed sourcing of ~/.bashrc; set PATH directly instead | |
| export PATH="$HOME/.pixi/bin:${PATH}" |
* Use binder/postBuild pattern to install conda explicit spec export of Pixi environment into Binder conda environment. * Remove binder/apt.txt and binder/requirements.txt. * Update book/introduction.md to note that for pip or uv users the dependencies are in book/requirements.txt.
4ff6dd3 to
1357386
Compare
binder/postBuildpattern to install conda explicit spec export of Pixi environment into Binder conda environment.binder/apt.txtandbinder/requirements.txt.book/introduction.mdto note that for pip or uv users the dependencies are inbook/requirements.txt.