Have build_image.py enforce that base.Dockerfile installs all pip dependencies#694
Open
ANogin wants to merge 5 commits into
Open
Have build_image.py enforce that base.Dockerfile installs all pip dependencies#694ANogin wants to merge 5 commits into
build_image.py enforce that base.Dockerfile installs all pip dependencies#694ANogin wants to merge 5 commits into
Conversation
At the start of `finish.Dockerfile, download setuptools and wheel to /pip-wheels for pip's PEP 517 build isolation. Then use PIP_NO_INDEX=1 PIP_FIND_LINKS=/pip-wheels for all pip install commands. If any runtime dependency was not properly installed by `base.Dockerfile` and is missing, pip fails with "No matching distribution found" plus a custom error message explaining the issue. Changes to `base.Dockerfile` generation: - Install `requirements-pip.txt` first (pins pip/setuptools versions) - Remove redundant `pip install --upgrade pip` (version now pinned) - Install `requirements-dev.txt` for DEVELOP builds Changes to finish.Dockerfile generation: - Download setuptools/wheel to /pip-wheels for build isolation - Remove redundant `pip install` of `requirements-dev.txt` (now in base) - Use `PIP_NO_INDEX=1 PIP_FIND_LINKS=/pip-wheels` for all pip installs - Add custom error message when pip install fails - Add `pip check` after installation to verify dependency consistency - Add `inspect` target to generated Makefile with `pip check` - Make `test` target depend on `inspect` Supersedes #218
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.
One sentence summary of this PR (This should go in the CHANGELOG!)
Have
build_image.pyenforce thatbase.Dockerfileinstalls all pip dependenciesLink to Related Issue(s)
Supersedes #218
Depends on #689 and #693:
requirements.txtfile toofrak_angr#689 needs to be merged first (or theofrak_angrmissingrequirements.txtresolved in some other way), and the resulting master branch merged into thisfeature/enforce_pip_sanitybranchaiohttpversion requirements consistent; address CVE-2025-69223 #693 needs to be merged first (or the aiohttp version mismatch resolved in some other way), and the resulting master branch merged into thisfeature/enforce_pip_sanitybranchPlease describe the changes in your request.
See #218 for some original motivation.
At the start of
finish.Dockerfile, download setuptools and wheel to /pip-wheels for pip's PEP 517 build isolation. Then use PIP_NO_INDEX=1 PIP_FIND_LINKS=/pip-wheels for all pip install commands. If any runtime dependency was not properly installed bybase.Dockerfile` and is missing, pip fails with "No matching distribution found" plus a custom error message explaining the issue.Changes to
base.Dockerfilegeneration:requirements-pip.txtfirst (pins pip/setuptools versions)pip install --upgrade pip(version now pinned)requirements-dev.txtfor DEVELOP builds (note - moving it here, before the code is copied, improves caching)Changes to finish.Dockerfile generation:
pip installofrequirements-dev.txt(now in base)PIP_NO_INDEX=1 PIP_FIND_LINKS=/pip-wheelsfor all pip installspip checkafter installation to verify dependency consistencyinspecttarget to generated Makefile withpip checktesttarget depend oninspectWithout #689 this results in:
during the
final.Dockerfilebuild.With #689, but without #693, this results in:
With both #689 and #693 included, everything builds without issues.
Anyone you think should look at this, specifically?
@whyitfor