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

Enable cleanup of CUDA RPM leftovers #282

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion scripts/run_commands
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ fi
# give sudo permission for conda user to run yum (user creation is postponed
# to the entrypoint, so we can create a user with the same id as the host)
echo 'conda ALL=NOPASSWD: /usr/bin/yum' >> /etc/sudoers
# give sudo permission to copy the cuda headers and libraries for cross compilation
# give sudo permission to copy the cuda headers and libraries for cross compilation & cleanup after
echo 'conda ALL=NOPASSWD: /usr/bin/cp -r /opt/conda/targets/x86_64-linux /usr/local/cuda/targets/x86_64-linux' >> /etc/sudoers
echo 'conda ALL=NOPASSWD: /usr/bin/cp -r /opt/conda/targets/ppc64le-linux /usr/local/cuda/targets/ppc64le-linux' >> /etc/sudoers
echo 'conda ALL=NOPASSWD: /usr/bin/cp -r /opt/conda/targets/sbsa-linux /usr/local/cuda/targets/sbsa-linux' >> /etc/sudoers
echo 'conda ALL=NOPASSWD: /usr/bin/rm -rf /opt/conda/targets/x86_64-linux' >> /etc/sudoers
echo 'conda ALL=NOPASSWD: /usr/bin/rm -rf /opt/conda/targets/ppc64le-linux' >> /etc/sudoers
echo 'conda ALL=NOPASSWD: /usr/bin/rm -rf /opt/conda/targets/sbsa-linux' >> /etc/sudoers
Comment on lines +28 to +30
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need sudo to delete these folders as they are owned by the user.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sometimes RPMs contents have weird permissions on them. So wanted to make this robust to that failure mode

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like an acceptable answer to me.


# Install the latest Miniconda with Python 3 and update everything.
curl -s -L $condapkg > miniconda.sh
Expand Down