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 #80

Open
anandhu-eng opened this issue Jun 20, 2024 · 1 comment
Open

Packages requiring SUDO are installed in user cache path #80

anandhu-eng opened this issue Jun 20, 2024 · 1 comment

Comments

@anandhu-eng
Copy link
Contributor

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'
@arjunsuresh
Copy link
Contributor

@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 arjunsuresh added this to the inference-4.1 milestone Jun 20, 2024
@arjunsuresh arjunsuresh self-assigned this Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants