-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[docker] Run profiling without sudo #10388
Conversation
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.
One minor comment.
python/ray/utils.py
Outdated
|
||
def get_user(): | ||
try: | ||
return pwd.getpwuid(os.getuid())[0] |
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.
Seems like pwd.getpwuid
returns named tuple (https://www.geeksforgeeks.org/pwd-module-in-python/)? Can you just use the name instead of index?
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.
Done!
@ijrsvt It seems like it fails tons of Windows tests. |
@rkooo567 Ah, looks like |
Why are these changes needed?
Sudo is not necessary in docker when the current user is
root
. This PR only usessudo
for profiling when the user is notroot
.Related issue number
Checks
scripts/format.sh
to lint the changes in this PR.