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
generated output is owned by ${USER} instead of root #344
Conversation
Nice functionality, Erik, and nicer implementation than what I had in mind when we discussed this! Just to clarify before reviewing: it seems that the functionality you added gets triggered by the |
@paolodi Yikes, good catch. I made a last-minute change to the implementation and got mixed up. Fixing now. |
Fixed and ready for review! |
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.
awesome, just 1 q
@erikr finding it might be useful to preserve all of a user's group permissions as well if |
Good idea. So you'd suggest:
|
I think it'd have more utility to add all of a user's group to the docker context, that way it's somewhat obvious to debug if a file cannot be accessed let's say i get an error that's like |
User who calls Example output:
Checking permissions of output:
and
|
We should test this in a more rigorous way, e.g. set the output to a directory in which |
Tests passed calling
|
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.
Great functionality, Erik, it works great!
* user/group of ml4cvd output is no longer root * tf.sh options: run as root, set up jupyter. Closes #334 * root is no longer default * disable silent reporting for -j in tf.sh * many echo statements to check array vals * user added to all user's groups in docker -> bash * fix indentation * adds --env to printed tf.sh call
* user/group of ml4cvd output is no longer root * tf.sh options: run as root, set up jupyter. Closes #334 * root is no longer default * disable silent reporting for -j in tf.sh * many echo statements to check array vals * user added to all user's groups in docker -> bash * fix indentation * adds --env to printed tf.sh call
* user/group of ml4cvd output is no longer root * tf.sh options: run as root, set up jupyter. Closes #334 * root is no longer default * disable silent reporting for -j in tf.sh * many echo statements to check array vals * user added to all user's groups in docker -> bash * fix indentation * adds --env to printed tf.sh call
* user/group of ml4cvd output is no longer root * tf.sh options: run as root, set up jupyter. Closes #334 * root is no longer default * disable silent reporting for -j in tf.sh * many echo statements to check array vals * user added to all user's groups in docker -> bash * fix indentation * adds --env to printed tf.sh call
scripts/tf.sh
runs as${USER}
instead ofroot
by default. This is accomplished by setting up the correct user and group in bash in docker, then calling the Python script as${USER}
.The end result is that output from calling
ml4cvd
is now owned by${USER}
instead ofroot
!To preserve prior behavior, the user can toggle between
${USER}
androot
using the-r
flag, although I am unaware of situations where this is desired.The
jupyter
directory is now created by callingtf.sh
with the-j
flag, instead of created by default.