Set up local mathlib installation support#247
Open
alok wants to merge 1 commit into
Open
Conversation
This change allows using a locally-built mathlib4 installation instead of fetching from git. This is useful for: - CI/CD pipelines with pre-built mathlib on S3 - Local development with custom mathlib modifications - Faster builds by avoiding mathlib recompilation ## Setup Instructions To use this configuration: 1. Clone mathlib4 as a sibling directory to vericoding3: ```bash cd .. # Go to parent of vericoding3 git clone https://github.com/leanprover-community/mathlib4 cd mathlib4 git checkout v4.23.0-rc2 # Match the version we were using ``` 2. Build mathlib (this will take significant time on first build): ```bash cd mathlib4 lake build ``` 3. Optional but recommended: Use mathlib cache for faster setup: ```bash lake exe cache get ``` 4. Return to vericoding3 and build: ```bash cd ../vericoding3 lake build ``` ## For S3/CI Deployment For S3-based deployment, the mathlib4 directory should be: - Pre-built with the correct version (v4.23.0-rc2) - Placed as a sibling directory to this repository - Include the .lake/build directory with compiled oleans The relative path ../mathlib4 assumes the following directory structure: ``` parent-directory/ ├── vericoding3/ │ └── lakefile.lean (this file) └── mathlib4/ ├── .lake/ │ └── build/ # Pre-compiled oleans └── Mathlib/ ```
Contributor
TheodoreEhrenborg
left a comment
There was a problem hiding this comment.
Please can we wait to merge this until we've done the s3 setup? Right now we don't have mathlib4 installed locally
Although the lean CI is still working on this PR? Not sure what's going on there
Making lake exe cache get more reliable would be nice, but the current workaround (falling back to a from-scratch build) is OK for now https://beneficialaif-jlt4758.slack.com/archives/C095QPZBALB/p1758139438372269?thread_ts=1758121047.933779&cid=C095QPZBALB
Contributor
Author
|
Sure
…On Thu, Sep 18, 2025 at 04:56 Theodore Ehrenborg ***@***.***> wrote:
***@***.**** commented on this pull request.
Please can we wait to merge this until we've done the s3 setup? Right now
we don't have mathlib4 installed locally
Although the lean CI is still working on this PR? Not sure what's going on
there
Making lake exe cache get more reliable would be nice, but the current
workaround (falling back to a from-scratch build) is OK for now
https://beneficialaif-jlt4758.slack.com/archives/C095QPZBALB/p1758139438372269?thread_ts=1758121047.933779&cid=C095QPZBALB
—
Reply to this email directly, view it on GitHub
<#247 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB7QUTC75YKEPQYIG2H54JD3TJXVLAVCNFSM6AAAAACG2TKO7SVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTEMZYGMYDKMBXGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
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.
This change allows using a locally-built mathlib4 installation instead of fetching from git. This is useful for:
Setup Instructions
To use this configuration:
Clone mathlib4 as a sibling directory to vericoding3:
bash cd .. # Go to parent of vericoding3 git clone https://github.com/leanprover-community/mathlib4 cd mathlib4 git checkout v4.23.0-rc2 # Match the version we were usingBuild mathlib (this will take significant time on first build):
bash cd mathlib4 lake buildOptional but recommended: Use mathlib cache for faster setup:
bash lake exe cache getReturn to vericoding3 and build:
bash cd ../vericoding3 lake buildFor S3/CI Deployment
For S3-based deployment, the mathlib4 directory should be:
The relative path ../mathlib4 assumes the following directory structure: