Add a script to compile modkit with libtorch GPU support#601
Open
SuhasSrinivasan wants to merge 5 commits intonanoporetech:masterfrom
Open
Add a script to compile modkit with libtorch GPU support#601SuhasSrinivasan wants to merge 5 commits intonanoporetech:masterfrom
SuhasSrinivasan wants to merge 5 commits intonanoporetech:masterfrom
Conversation
Update LD_LIBRARY_PATH export format for compatibility.
# What this script does: # 0. Installs Xcode Command Line Tools # 1. Installs Homebrew package manager # 2. Installs rustup (Rust toolchain installer) # 3. Installs Rust compiler (rustc) and Cargo build tool # 4. Clones the modkit GitHub repository # 5. Checks out the latest release version # 6. Creates a Python virtual environment # 7. Installs PyTorch in the virtual environment # 8. Sets and verifies environment variables for libtorch # 9. Builds modkit with macOS GPU (MPS) support
There was a problem hiding this comment.
Pull request overview
Adds macOS automation and minor documentation updates to support building/running modkit with PyTorch/libtorch GPU acceleration (Apple Silicon / MPS), plus a doc image fix.
Changes:
- Add
mac_compile_modkit.shto install prerequisites, create a venv with PyTorch, set libtorch env vars, and build modkit withaccelerate,tch. - Update open-chromatin docs to reference a new non-alpha PNG asset.
- Improve
LD_LIBRARY_PATHexport inBUILD_NOTES_tch.txtto safely append without clobbering existing values.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| mac_compile_modkit.sh | New end-to-end macOS build/install script for modkit with PyTorch/libtorch + MPS support. |
| docs/intro_open_chromatin.html | Switch referenced figure to new “no alpha” image. |
| docs/images/chromatin_stenciling_3_no_alpha.png | Add updated image asset used by the open chromatin intro docs. |
| BUILD_NOTES_tch.txt | Make LD_LIBRARY_PATH export append-safe (preserves existing path). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Updated installation messages and added timeout handling for Xcode Command Line Tools. Improved Homebrew path setup and ensured compatibility checks for macOS version.
Contributor
|
Hello @SuhasSrinivasan thank you for this! Could you pull the documentation and image changes out into a separate PR? I can merge those immediately. I'll want to test the mac-releated scripts. |
Author
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What the script does:
This script has been tested with the following:
macOS Version: 26.3.1 (a)
Modkit Version: v0.6.1
Rust Version: rustc 1.90.0 (1159e78c4 2025-09-14)
Cargo Version: cargo 1.90.0 (840b83a10 2025-07-30)
Python Version: Python 3.13.11
PyTorch Version: 2.10.0