This is a continuation of #149. I made the mistake of opening the PR directly from a branch in my colleague's fork without realizing I don't have push access to that. Apologies for the inconvenience.
I think this PR also addresses the comment by @tfoote by appending the chmod onto the previous RUN command.
As for the reproduction example, you can trigger the error by creating an image with a non-root user, and then try to run that image with the --nvidia flag.
For instance, this
mkdir -p /tmp/context && cd /tmp/context
cat <<EOF > Dockerfile
FROM ros:melodic
RUN useradd -ms /bin/bash someuser
USER someuser
EOF
docker build -t deletethis .
rocker --nvidia deletethis
fails for me on main, whereas it passes ok with the fix.
This is a continuation of #149. I made the mistake of opening the PR directly from a branch in my colleague's fork without realizing I don't have push access to that. Apologies for the inconvenience.
I think this PR also addresses the comment by @tfoote by appending the
chmod
onto the previousRUN
command.As for the reproduction example, you can trigger the error by creating an image with a non-root user, and then try to run that image with the
--nvidia
flag.For instance, this
fails for me on
main
, whereas it passes ok with the fix.