-
Notifications
You must be signed in to change notification settings - Fork 51
Update dependency management to pixi #513
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
Open
OleBialas
wants to merge
14
commits into
neuromatch:main
Choose a base branch
from
OleBialas:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
bba4240
fix all dependencies
OleBialas 804e47d
use pixi for pip install
OleBialas 17b3130
fix YAML syntax
OleBialas b84c10b
pin setuptools to an older version that does include pgk_resources (n…
OleBialas 5874e59
pixi native install
OleBialas b046ac0
add nmaci
OleBialas 149e3c3
dont use setup python action
OleBialas 643ce0b
remove nmaci branch-override logic
OleBialas 58a1ed7
move apt dependencies to pixi.toml
OleBialas fca2c00
move pip install to guarded cell and add dm_control + dm-acme to pixi…
OleBialas 3522836
add EGL/Mesa packages
OleBialas d12536b
install EGL deps with apt
OleBialas d0a8d14
Process tutorial notebooks (some notebooks moved to follow-up PR)
actions-user 70af911
Merge pull request #4 from OleBialas/pixi2
OleBialas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,32 +1,33 @@ | ||
| name: 'Setup Python Environment' | ||
| description: 'Set up Python with caching and install base dependencies' | ||
|
|
||
| inputs: | ||
| python-version: | ||
| description: 'Python version to install' | ||
| required: false | ||
| default: '3.10' | ||
| description: 'Set up the pixi Python environment' | ||
|
|
||
| outputs: | ||
| cache-hit: | ||
| description: 'Whether pip cache was hit' | ||
| value: ${{ steps.setup-python.outputs.cache-hit }} | ||
| description: 'Whether the pixi environment cache was hit' | ||
| value: ${{ steps.cache-pixi.outputs.cache-hit }} | ||
|
|
||
| runs: | ||
| using: 'composite' | ||
| steps: | ||
| - name: Set up Python | ||
| id: setup-python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ inputs.python-version }} | ||
| cache: 'pip' | ||
| cache-dependency-path: requirements.txt | ||
|
|
||
| - name: Upgrade pip | ||
| - name: Install pixi | ||
| shell: bash | ||
| run: pip install --upgrade pip wheel | ||
| run: | | ||
| if ! command -v pixi >/dev/null 2>&1; then | ||
| curl -fsSL https://pixi.sh/install.sh | bash | ||
| fi | ||
| echo "$HOME/.pixi/bin" >> "$GITHUB_PATH" | ||
|
|
||
| - name: Cache pixi environment | ||
| id: cache-pixi | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| .pixi | ||
| ~/.cache/rattler | ||
| key: pixi-${{ runner.os }}-${{ hashFiles('pixi.toml', 'pixi.lock') }} | ||
|
|
||
| - name: Install requirements | ||
| - name: Install pixi environment | ||
| shell: bash | ||
| run: pip install -r requirements.txt | ||
| run: | | ||
| "$HOME/.pixi/bin/pixi" install --locked -e ci | ||
| echo "$GITHUB_WORKSPACE/.pixi/envs/ci/bin" >> "$GITHUB_PATH" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,52 +1,41 @@ | ||
| name: 'Setup Rendering Dependencies' | ||
| description: 'Install fonts, backend libraries, and graphviz for notebook rendering' | ||
| description: 'Install fonts, backend libraries, and configure rendering for notebooks' | ||
|
|
||
| inputs: | ||
| skip-fonts: | ||
| description: 'Skip XKCD font installation' | ||
| required: false | ||
| default: 'false' | ||
| skip-backend: | ||
| description: 'Skip backend libraries' | ||
| required: false | ||
| default: 'false' | ||
| skip-graphviz: | ||
| description: 'Skip graphviz installation' | ||
| required: false | ||
| default: 'false' | ||
|
|
||
| runs: | ||
| using: 'composite' | ||
| steps: | ||
| - name: Cache fonts | ||
| id: cache-fonts | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: /usr/share/fonts/truetype/humor-sans | ||
| path: ~/.local/share/fonts/humor-sans | ||
| key: fonts-${{ runner.os }}-humor-sans-v1 | ||
|
|
||
| - name: Install XKCD fonts | ||
| if: ${{ inputs.skip-fonts != 'true' }} | ||
| shell: bash | ||
| run: | | ||
| if [ ! -f /usr/share/fonts/truetype/humor-sans/Humor-Sans.ttf ]; then | ||
| sudo apt-get update -yq | ||
| wget -q http://archive.ubuntu.com/ubuntu/pool/universe/f/fonts-humor-sans/fonts-humor-sans_1.0-4_all.deb | ||
| sudo dpkg -i --force-all fonts-humor-sans_1.0-4_all.deb <<< 'yes' 2>/dev/null || true | ||
| sudo apt install -fy | ||
| rm -f fonts-humor-sans_1.0-4_all.deb $HOME/.matplotlib/fontList.cache | ||
| font_dir="$HOME/.local/share/fonts/humor-sans" | ||
| font_file="$font_dir/Humor-Sans.ttf" | ||
| if [ ! -f "$font_file" ]; then | ||
| mkdir -p "$font_dir" | ||
| curl -fsSL \ | ||
| -o "$font_file" \ | ||
| https://raw.githubusercontent.com/shreyankg/xkcd-desktop/master/Humor-Sans.ttf | ||
| fc-cache -f "$HOME/.local/share/fonts" | ||
| rm -f "$HOME"/.matplotlib/fontlist-v*.json "$HOME/.matplotlib/fontList.cache" | ||
| else | ||
| echo "XKCD fonts already cached" | ||
| fi | ||
|
|
||
| - name: Install backend libraries | ||
| if: ${{ inputs.skip-backend != 'true' }} | ||
| - name: Configure headless rendering | ||
| shell: bash | ||
| run: | | ||
| sudo apt-get update -yq || true | ||
| sudo apt-get install -y libglew-dev libglfw3 ffmpeg | ||
| echo "MUJOCO_GL=egl" >> $GITHUB_ENV | ||
|
|
||
| - name: Install Graphviz | ||
| if: ${{ inputs.skip-graphviz != 'true' }} | ||
| uses: tlylt/install-graphviz@v1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
we should probably update this readme in general to remove the need to clone the repo and just let pixi install the packages