-
Notifications
You must be signed in to change notification settings - Fork 80
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
Fix Python container example #301
Conversation
Change examples/python-container to pin the nixpkgs revision in the same way as the toolchain examples. Update the nixpkgs revision to 22.05 which is needed to include bazel_5.
Use the same `local_repository` setup as the other examples.
py_image transitively depends on a cc toolchain.
rules_docker's py_image requires a dedicated Python (and transitively C++) toolchain that is compatible with the `run_in_container` execution constraint. This collides with the nixpkgs host platform. So, we define a dedicated platform that fulfills both requirements.
MacOS requires appropriate cross-platform toolchain configration since the Docker image is a Linux target.
d94d091
to
eddffa7
Compare
It turns out that a rules_docker Python image also requires a CC toolchain that fulfills the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The example was still using an older nixpkgs revision that did not provide the required Bazel version 5. This PR updates the nixpkgs revision. This PR also adds the example to at least build the image on CI, to make sure that we notice any such discrepancies in the future.