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

Packages requiring SUDO are installed in user cache path #35

Open
anandhu-eng opened this issue Dec 12, 2024 · 2 comments
Open

Packages requiring SUDO are installed in user cache path #35

anandhu-eng opened this issue Dec 12, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@anandhu-eng
Copy link
Contributor


Migrated from mlcommons/mlperf-automations_archived#43
Originally created by @anandhu-eng on Thu, 20 Jun 2024 10:35:57 GMT


Currently, the install, cuda script installs the packages with SUDO permission to user path, which requires SUDO permission to remove when doing cm rm cache. Also, upon installation to user path, the other users in the system might not be able to access the packages.

This was the error while cache removal:

Deleting CM artifact in /home/anandhu/CM/repos/local/cache/911bc2acb2d841df with tags "install,cuda,prebuilt,prebuilt-cuda,install-prebuilt-cuda,version-12.4.1,script-artifact-14eadcd42ba340c3" ...
Traceback (most recent call last):
  File "/home/anandhu/.local/bin/cm", line 8, in <module>
    sys.exit(run())
             ^^^^^
  File "/home/anandhu/.local/lib/python3.12/site-packages/cmind/cli.py", line 37, in run
    r = cm.access(argv, out='con')
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anandhu/.local/lib/python3.12/site-packages/cmind/core.py", line 602, in access
    r = action_addr(i)
        ^^^^^^^^^^^^^^
  File "/home/anandhu/.local/lib/python3.12/site-packages/cmind/automation.py", line 605, in delete
    shutil.rmtree(path_to_artifact)
  File "/usr/lib/python3.12/shutil.py", line 785, in rmtree
    _rmtree_safe_fd(fd, path, onexc)
  File "/usr/lib/python3.12/shutil.py", line 686, in _rmtree_safe_fd
    _rmtree_safe_fd(dirfd, fullname, onexc)
  File "/usr/lib/python3.12/shutil.py", line 686, in _rmtree_safe_fd
    _rmtree_safe_fd(dirfd, fullname, onexc)
  File "/usr/lib/python3.12/shutil.py", line 717, in _rmtree_safe_fd
    onexc(os.unlink, fullname, err)
  File "/usr/lib/python3.12/shutil.py", line 715, in _rmtree_safe_fd
    os.unlink(entry.name, dir_fd=topfd)
PermissionError: [Errno 13] Permission denied: 'fortran.c'
@anandhu-eng anandhu-eng added the enhancement New feature or request label Dec 12, 2024
@anandhu-eng
Copy link
Contributor Author


Migrated from mlcommons/mlperf-automations_archived#43 (comment)
Originally created by @arjunsuresh on Thu, 20 Jun 2024 10:42:22 GMT


@anandhu-eng that's correct. I think the best solution will be to install such packages under /opt directory (not sure if we have any such installations for windows) and then add a cache_dependency path in the respective script.

@arjunsuresh
Copy link
Collaborator

I think we can go with installing such tools under /opt/mlc-installs and then add this path automatically to the "search" path for the installed components.

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

No branches or pull requests

2 participants