Skip to content
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 runs as root (mnist_openfl example) #192

Open
msheller opened this issue Jul 20, 2021 · 2 comments
Open

Docker runs as root (mnist_openfl example) #192

msheller opened this issue Jul 20, 2021 · 2 comments
Assignees
Milestone

Comments

@msheller
Copy link

When I follow the mnist_openfl example, the container runs as root. This also means that all output files are set to root ownership, and are thus unwriteable by other users.

I modified the example to have separate model_in and model_out directories so that I could overwrite the model_in without being root. here you can see the root ownership:

~/git/mlcube_examples/mnist_openfl/workspace/model_out(master*) » ll
total 4.0K
drwxr-xr-x 4 root root 4.0K Jul 13 15:18 mnist_model

@tanertopal
Copy link

This is generally an issue with mounted volumes in docker as the docker daemon runs as root. If relative volumes are mounted you need to take care in the docker container how you set the user id and group id.

One approach I have taken in other projects is to pass Linux user and group id (usually $UID/$GID) into the container and write with those ids. That will than have the correct user permissions on the host system which should be desirable for mlcube I think.

This should probably be resolved when the following options --user $(id -u):$(id -g) are added to this string: https://github.com/mlcommons/mlcube/blob/master/runners/mlcube_docker/mlcube_docker/docker_run.py#L85

@relja128 relja128 added this to the 2021.10 milestone Oct 22, 2021
@relja128
Copy link

We should make this very obvious in the docs so that people don't run into permissions issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants