You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.
Aliases are not propagated through non-interactive shells hence your error.
What you can do instead is using sudo on the nvidia-docker script: alias docker='sudo nvidia-docker'
The problem is that I have only been given sudo access (without password)
for running "/usr/bin/docker" on this particular machine. This means that I
cannot use an alias for nvidia-docker directly.
Aliases are not propagated through non-interactive shells hence your error.
What you can do instead is using sudo on the nvidia-docker script:
alias docker='sudo nvidia-docker'
—
Reply to this email directly or view it on GitHub #9 (comment).
On machines where sudo permissions are required for docker (see for exampel the discussion on
/etc/sudoers
from http://www.projectatomic.io/blog/2015/08/why-we-dont-let-non-root-users-run-docker-in-centos-fedora-or-rhel/), thenvidia-docker
script does not seem to work as expected.I have tried the following:
alias docker='sudo /usr/bin/docker'
to~/.bashrc
alias docker='sudo /usr/bin/docker'
to~/.profile
But the alias not correctly propagated to
nvidia-docker
.Adding
alias docker='sudo /usr/bin/docker'
to the top of thenvidia-docker
script directly allows for the script to work correctly in this setting.Any pointers on how this could be addressed locally?
The text was updated successfully, but these errors were encountered: