Skip to content

Mac compile script based on v0.6.2#613

Open
SuhasSrinivasan wants to merge 12 commits intonanoporetech:masterfrom
SuhasSrinivasan:master
Open

Mac compile script based on v0.6.2#613
SuhasSrinivasan wants to merge 12 commits intonanoporetech:masterfrom
SuhasSrinivasan:master

Conversation

@SuhasSrinivasan
Copy link
Copy Markdown
Contributor

  1. Added help markdown to book/src
  2. Installs Xcode Command Line Tools
  3. Installs Homebrew package manager
  4. Considers uv and pyenv through config
  5. Installs rustup (Rust toolchain installer)
  6. Installs Rust compiler (rustc) and Cargo build tool
  7. Clones the modkit GitHub repository
  8. Checks out the latest release version
  9. Creates a Python virtual environment
  10. Installs PyTorch in the virtual environment
  11. Sets and verifies environment variables for libtorch
  12. Builds modkit with macOS GPU (MPS) support

Copilot AI review requested due to automatic review settings May 4, 2026 01:43
Copy link
Copy Markdown

Copilot AI left a 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 adds a macOS-focused installation path for building modkit from source with the tch/PyTorch-backed open-chromatin stack, plus companion documentation in the mdBook docs. It fits into the existing repository by extending the current build-note/docs story with a scripted Apple/macOS workflow.

Changes:

  • Adds a new mac_compile_modkit.sh installer that sets up toolchains, clones the repo, prepares Python/PyTorch, and builds modkit.
  • Adds configurable Python selection via system Python, pyenv, or uv.
  • Adds a new mdBook page describing the macOS installation workflow and troubleshooting steps.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 12 comments.

File Description
mac_compile_modkit.sh New end-to-end macOS build/install script for compiling modkit with PyTorch/libtorch-based support.
book/src/mac_compile_modkit.md New user-facing documentation for the macOS installation workflow and common troubleshooting steps.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread book/src/mac_compile_modkit.md
Comment thread book/src/mac_compile_modkit.md
Comment thread book/src/mac_compile_modkit.md
Comment thread mac_compile_modkit.sh Outdated
Comment thread mac_compile_modkit.sh Outdated
Comment thread mac_compile_modkit.sh Outdated
Comment thread book/src/mac_compile_modkit.md Outdated
Comment thread mac_compile_modkit.sh Outdated
Comment thread mac_compile_modkit.sh Outdated
Comment thread mac_compile_modkit.sh Outdated
@SuhasSrinivasan
Copy link
Copy Markdown
Contributor Author

SuhasSrinivasan commented May 4, 2026

Tested on Sunday, May 3, 2026 at 7:30PM PDT
macOS: 26.4.1
M2 Ultra Mac Studio

$ bash mac_compile_modkit.sh ~/projects/modkit/modkit-0.6.2 v0.6.2
.
.
.
   Compiling modkit v0.6.1 (/Users/suhas/projects/modkit/modkit-0.6.2/modkit/modkit)
    Finished `release` profile [optimized] target(s) in 1m 45s
✓ Modkit compiled successfully!
✓ Binary created at: /Users/suhas/projects/modkit/modkit-0.6.2/modkit/target/release/modkit
  Binary size:  21M

Testing modkit binary...
modkit 0.6.1
✓ Modkit is working correctly!

Available modkit commands:
Installation information saved to: /Users/suhas/projects/modkit/modkit-0.6.2/installation_info.txt
✓ Added modkit environment setup to ~/.zprofile
  It will activate automatically in every new terminal session.

Total installation time: 2 minutes 39 seconds

Versioning issue noted in #614

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