-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Use Recursive Mount Option when attempting to mount proc in linux sandbox #18069
Use Recursive Mount Option when attempting to mount proc in linux sandbox #18069
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
6ee5f0f
to
9d0dcbc
Compare
9d0dcbc
to
055f7ad
Compare
Hi @Ryang20718, Can you please fix above build-kite failures. Thanks! |
I'm a bit skittish about such a global change for a very specific case. Before making this change for everyone, could you check if you can use some variation of |
Fully understand the skittish concerns 😓 I had originally tried
|
The failing test is due to the PID when inside /proc/self != PID of Wondering if this test behaviour is absolutely necessary for some behaviour of bazel or if this was a test that was written when first adding the mount /proc to code? @sgowroji If this behaviour isn't necessary, I can remove remove the last check of this test. |
I think that test is a very good canary in this goldmine. There are many places that use |
Is the failure to mount with |
Both
|
I had the same idea, ran into the same problem, and concluded there is no way to make it work. See #17574 (comment) for some further ideas. |
oh interesting, bind mounting the volume to the docker container but under a different dir fixes the permission issue! |
@bsilver8192 Was testing the mount fix with a privileged docker container via volume mounting Confirming linux-sandbox mount works
We still hit issues with unless specifying --network=host. Wondering if you had to work around that at all?
Running the same code outside the container w/ linux-sandbox works just fine, so I don't believe it's a linux-sandbox issue but I think some combination of nvidia docker runtime + linux-sandbox |
I have |
Currently on Bazel 6.0.0
Problem: Due to Nvidia Runtime Mounting Proc, when running bazel within a docker container, we hit
We see that there's a nested proc mount
Whilst I know this is nvidia problem and limited to local execution, it would be nice to be able to use linux-sandbox within a docker container w/ access to Nvidia runtime.
Proposal:
Add recursive bind option when mounting proc.
Given that proc is mounted as read only, I don't think the recursive mount would be an issue?