-
Notifications
You must be signed in to change notification settings - Fork 321
Self-repairing incremental installs #363
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
Merged
Merged
Changes from 11 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
9ce1045
Better help message for PyCall errors
MilesCranmer 49567da
Fix grammar in log message
MilesCranmer c04aabc
Try to install second time with PyCall
MilesCranmer 3fea07f
Add dockerfile for debugging pycall
MilesCranmer 6c7c86f
Make PyCall debug dockerfile test local version of PySR
MilesCranmer 0028a88
Move install simulator to test folder
MilesCranmer 51eb2dd
Add test for incremental install
MilesCranmer 5d83b3a
style: Format code with black
deepsource-autofix[bot] b6fd52e
Improve readability of incremental install simulator
MilesCranmer 73c59a6
Fix missing -l in docker command
MilesCranmer 7ef8428
Document dockerfile
MilesCranmer 6cedbd3
Automatically reference latest PySR version
MilesCranmer 61ddc76
Bump PySR version with automatic error recovery
MilesCranmer 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
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 |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| # This dockerfile simulates a user installation that first | ||
| # builds PySR for Python 3.9, and then upgrades to Python 3.10. | ||
| # Normally this would cause an error when installing PyCall, so we want to | ||
| # ensure that PySR can automatically patch things. | ||
| FROM debian:bullseye-slim | ||
|
|
||
| ENV DEBIAN_FRONTEND=noninteractive | ||
|
|
||
| # Install juliaup and pyenv: | ||
| RUN apt-get update && apt-get install -y curl git build-essential \ | ||
| libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev \ | ||
| libncurses5-dev libncursesw5-dev xz-utils libffi-dev liblzma-dev && \ | ||
| apt-get clean && \ | ||
| rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Install juliaup: | ||
| RUN curl -fsSL https://install.julialang.org | sh -s -- -y | ||
|
|
||
| # Install pyenv: | ||
| RUN curl -fsSL curl https://pyenv.run | sh && \ | ||
| echo 'export PATH="/root/.pyenv/bin:$PATH"' >> ~/.bashrc && \ | ||
| echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc && \ | ||
| echo 'eval "$(pyenv init -)"' >> ~/.bashrc && \ | ||
| echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc | ||
|
|
||
| # Default to using bash -l: | ||
| SHELL ["/bin/bash", "-l", "-c"] | ||
|
|
||
| RUN juliaup add 1.8 && juliaup default 1.8 | ||
| RUN pyenv install 3.9.2 && pyenv global 3.9.2 | ||
| RUN python3 -m pip install --upgrade pip | ||
|
|
||
| # Get PySR source: | ||
| WORKDIR /pysr | ||
| ADD ./requirements.txt /pysr/requirements.txt | ||
| RUN python3 -m pip install -r /pysr/requirements.txt | ||
|
|
||
| ADD ./setup.py /pysr/setup.py | ||
| ADD ./pysr/ /pysr/pysr/ | ||
|
|
||
| # First install of PySR: | ||
| RUN python3 -m pip install . | ||
| RUN python3 -m pysr install | ||
|
|
||
| # Change Python version: | ||
| RUN pyenv install 3.10 && pyenv global 3.10 && pyenv uninstall -f 3.9.2 | ||
| RUN python3 -m pip install --upgrade pip | ||
|
|
||
| # Second install of PySR: | ||
| RUN python3 -m pip install . | ||
| RUN rm -r ~/.julia/environments/pysr-0.14.2 | ||
| RUN python3 -m pysr install | ||
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.
Uh oh!
There was an error while loading. Please reload this page.