User in devel container
bhack opened this issue · comments
We still tell to users to use HOST_PERMS
like in https://www.tensorflow.org/install/source#cpu-only_2 but it is used marginally and it doesn't solve permission on your volume mount.
I think we could prefer -u $(id -u):$(id -g)
but we need to have a non root user in the image.
Something like:
docker run -it -w /tensorflow -v /path_tensorflow_host:/tensorflow -v /path_bazel_cache_host/:/.cache -v $PWD:/mnt -e USER=tensorflow -u $(id -u):$(id -g) tensorflow/tensorflow:devel bash
it will let to maintain file with you host permission and also to reuse the cache over builds.
With a command like this we could solve tensorflow/tensorflow#39560
Se also my PR at microsoft/vscode-dev-containers#381.
I don't care too much now as we could have user namespaces in rootless mode:
tensorflow/tensorflow#55566